mirror of
https://github.com/chatmail/core.git
synced 2026-05-19 23:06:32 +03:00
Update rust toolchain to 1.45.0
This commit is contained in:
committed by
link2xt
parent
933b14eedf
commit
1c73021d77
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
|||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: 1.43.1
|
toolchain: 1.45.0
|
||||||
override: true
|
override: true
|
||||||
- run: rustup component add rustfmt
|
- run: rustup component add rustfmt
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: 1.43.1
|
toolchain: 1.45.0
|
||||||
components: clippy
|
components: clippy
|
||||||
override: true
|
override: true
|
||||||
- uses: actions-rs/clippy-check@v1
|
- uses: actions-rs/clippy-check@v1
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
rust: [nightly, 1.43.1]
|
rust: [nightly, 1.45.0]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
set -e -x
|
set -e -x
|
||||||
|
|
||||||
# Install Rust
|
# Install Rust
|
||||||
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.43.1-x86_64-unknown-linux-gnu -y
|
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.45.0-x86_64-unknown-linux-gnu -y
|
||||||
export PATH=/root/.cargo/bin:$PATH
|
export PATH=/root/.cargo/bin:$PATH
|
||||||
rustc --version
|
rustc --version
|
||||||
|
|
||||||
# remove some 300-400 MB that we don't need for automated builds
|
# remove some 300-400 MB that we don't need for automated builds
|
||||||
rm -rf /root/.rustup/toolchains/1.43.1-x86_64-unknown-linux-gnu/share
|
rm -rf /root/.rustup/toolchains/1.45.0-x86_64-unknown-linux-gnu/share
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.43.1
|
1.45.0
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
clippy::all,
|
clippy::all,
|
||||||
clippy::indexing_slicing
|
clippy::indexing_slicing
|
||||||
)]
|
)]
|
||||||
#![allow(clippy::match_bool)]
|
#![allow(clippy::match_bool, clippy::eval_order_dependence)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate num_derive;
|
extern crate num_derive;
|
||||||
|
|||||||
@@ -6,10 +6,9 @@
|
|||||||
// this escapes a bit more than actually needed by delta (eg. also lines as "-- footer"),
|
// this escapes a bit more than actually needed by delta (eg. also lines as "-- footer"),
|
||||||
// but for non-delta-compatibility, that seems to be better.
|
// but for non-delta-compatibility, that seems to be better.
|
||||||
// (to be only compatible with delta, only "[\r\n|\n]-- {0,2}[\r\n|\n]" needs to be replaced)
|
// (to be only compatible with delta, only "[\r\n|\n]-- {0,2}[\r\n|\n]" needs to be replaced)
|
||||||
#[allow(clippy::indexing_slicing)]
|
|
||||||
pub fn escape_message_footer_marks(text: &str) -> String {
|
pub fn escape_message_footer_marks(text: &str) -> String {
|
||||||
if text.starts_with("--") {
|
if let Some(text) = text.strip_prefix("--") {
|
||||||
"-\u{200B}-".to_string() + &text[2..].replace("\n--", "\n-\u{200B}-")
|
"-\u{200B}-".to_string() + &text.replace("\n--", "\n-\u{200B}-")
|
||||||
} else {
|
} else {
|
||||||
text.replace("\n--", "\n-\u{200B}-")
|
text.replace("\n--", "\n-\u{200B}-")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -601,13 +601,10 @@ fn is_file_in_use(files_in_use: &HashSet<String>, namespc_opt: Option<&str>, nam
|
|||||||
files_in_use.contains(name_to_check)
|
files_in_use.contains(name_to_check)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::indexing_slicing)] // TODO: use str.strip_prefix once it is released in stable
|
|
||||||
fn maybe_add_file(files_in_use: &mut HashSet<String>, file: impl AsRef<str>) {
|
fn maybe_add_file(files_in_use: &mut HashSet<String>, file: impl AsRef<str>) {
|
||||||
if !file.as_ref().starts_with("$BLOBDIR/") {
|
if let Some(file) = file.as_ref().strip_prefix("$BLOBDIR/") {
|
||||||
return;
|
files_in_use.insert(file.to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
files_in_use.insert(file.as_ref()[9..].into());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn maybe_add_from_param(
|
async fn maybe_add_from_param(
|
||||||
|
|||||||
Reference in New Issue
Block a user