mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 23:36:30 +03:00
ci: update Rust to 1.81.0
This commit is contained in:
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
|||||||
name: Lint Rust
|
name: Lint Rust
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
RUSTUP_TOOLCHAIN: 1.80.1
|
RUSTUP_TOOLCHAIN: 1.81.0
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -95,11 +95,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
rust: 1.80.1
|
rust: 1.81.0
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
rust: 1.80.1
|
rust: 1.81.0
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
rust: 1.80.1
|
rust: 1.81.0
|
||||||
|
|
||||||
# Minimum Supported Rust Version = 1.77.0
|
# Minimum Supported Rust Version = 1.77.0
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set -euo pipefail
|
|||||||
#
|
#
|
||||||
# Avoid using rustup here as it depends on reading /proc/self/exe and
|
# Avoid using rustup here as it depends on reading /proc/self/exe and
|
||||||
# has problems running under QEMU.
|
# has problems running under QEMU.
|
||||||
RUST_VERSION=1.80.1
|
RUST_VERSION=1.81.0
|
||||||
|
|
||||||
ARCH="$(uname -m)"
|
ARCH="$(uname -m)"
|
||||||
test -f "/lib/libc.musl-$ARCH.so.1" && LIBC=musl || LIBC=gnu
|
test -f "/lib/libc.musl-$ARCH.so.1" && LIBC=musl || LIBC=gnu
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ pub(super) fn decode_login(qr: &str) -> Result<Qr> {
|
|||||||
.unwrap_or(url_without_scheme);
|
.unwrap_or(url_without_scheme);
|
||||||
|
|
||||||
let addr = payload
|
let addr = payload
|
||||||
.split(|c| c == '?' || c == '/')
|
.split(['?', '/'])
|
||||||
.next()
|
.next()
|
||||||
.context("invalid DCLOGIN payload E3")?;
|
.context("invalid DCLOGIN payload E3")?;
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ pub(crate) fn truncate(buf: &str, approx_chars: usize) -> Cow<str> {
|
|||||||
.map(|(n, _)| n)
|
.map(|(n, _)| n)
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
if let Some(index) = buf[..end_pos].rfind(|c| c == ' ' || c == '\n') {
|
if let Some(index) = buf[..end_pos].rfind([' ', '\n']) {
|
||||||
Cow::Owned(format!("{}{}", &buf[..=index], DC_ELLIPSIS))
|
Cow::Owned(format!("{}{}", &buf[..=index], DC_ELLIPSIS))
|
||||||
} else {
|
} else {
|
||||||
Cow::Owned(format!("{}{}", &buf[..end_pos], DC_ELLIPSIS))
|
Cow::Owned(format!("{}{}", &buf[..end_pos], DC_ELLIPSIS))
|
||||||
@@ -98,7 +98,7 @@ pub(crate) fn truncate_by_lines(
|
|||||||
// Text has too many lines and needs to be truncated.
|
// Text has too many lines and needs to be truncated.
|
||||||
let text = {
|
let text = {
|
||||||
if let Some(buffer) = buf.get(..end_pos) {
|
if let Some(buffer) = buf.get(..end_pos) {
|
||||||
if let Some(index) = buffer.rfind(|c| c == ' ' || c == '\n') {
|
if let Some(index) = buffer.rfind([' ', '\n']) {
|
||||||
buf.get(..=index)
|
buf.get(..=index)
|
||||||
} else {
|
} else {
|
||||||
buf.get(..end_pos)
|
buf.get(..end_pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user