feat: bump msrv and rust to v1.83 and v1.85 (#1407)

This commit is contained in:
Myriad-Dreamin 2025-02-26 14:40:23 +08:00 committed by GitHub
parent 208ce3dbad
commit bbed728b82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 8 additions and 8 deletions

View file

@ -85,7 +85,7 @@ jobs:
node-version: 22
- name: Check Rust Version
run: yarn check-msrv
- uses: dtolnay/rust-toolchain@1.82.0 # check-min-version
- uses: dtolnay/rust-toolchain@1.83.0 # check-min-version
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace

View file

@ -8,7 +8,7 @@ license = "Apache-2.0"
homepage = "https://github.com/Myriad-Dreamin/tinymist"
repository = "https://github.com/Myriad-Dreamin/tinymist"
# also change in ci.yml
rust-version = "1.82"
rust-version = "1.83"
[workspace]
resolver = "2"

View file

@ -166,7 +166,7 @@ impl CompletionPair<'_, '_, '_> {
let docs = default_docs.get(&name).cloned();
let label_detail = ty.describe().map(From::from).or_else(|| Some("any".into()));
let label_detail = ty.describe().or_else(|| Some("any".into()));
crate::log_debug_ct!("scope completions!: {name} {ty:?} {label_detail:?}");
let detail = docs.or_else(|| label_detail.clone());

View file

@ -228,7 +228,7 @@ impl CompletionPair<'_, '_, '_> {
continue;
}
let label_details = ty.describe().map(From::from).or_else(|| Some("any".into()));
let label_details = ty.describe().or_else(|| Some("any".into()));
let base = Completion {
kind: CompletionKind::Func,
label_details,

View file

@ -24,7 +24,7 @@ impl InternId {
}
fn to_u64(&self) -> u64 {
(self.lifetime as u64) << 32 | self.id as u64
((self.lifetime as u64) << 32) | self.id as u64
}
fn from_u64(id: u64) -> Self {

View file

@ -69,7 +69,7 @@ pub(crate) fn get_outline(introspector: &Introspector) -> Option<Vec<HeadingNode
// (not exceeding whichever is the most restrictive depth limit
// of those two).
while children.last().is_some_and(|last| {
last_skipped_level.map_or(true, |l| last.level < l) && last.level < leaf.level
last_skipped_level.is_none_or(|l| last.level < l) && last.level < leaf.level
}) {
children = &mut children.last_mut().unwrap().children;
}
@ -81,7 +81,7 @@ pub(crate) fn get_outline(introspector: &Introspector) -> Option<Vec<HeadingNode
// needed, following the usual rules listed above.
last_skipped_level = None;
children.push(leaf);
} else if last_skipped_level.map_or(true, |l| leaf.level < l) {
} else if last_skipped_level.is_none_or(|l| leaf.level < l) {
// Only the topmost / lowest-level skipped heading matters when you
// have consecutive skipped headings (since none of them are being
// added to the bookmark tree), hence the condition above.

View file

@ -1,3 +1,3 @@
[toolchain]
channel = "1.84"
channel = "1.85"
components = ["rustc", "cargo", "rust-std", "clippy", "rustfmt"]