chore: set Rust MSRV to 1.88

This commit is contained in:
Yuri Karamian
2026-08-17 21:15:11 +02:00
parent dd748776b2
commit 1bd4cd8138
6 changed files with 22 additions and 13 deletions
+5 -1
View File
@@ -5,7 +5,11 @@ description = "Local markdown note-taking app"
authors = ["HelixNotes"]
license = "AGPL-3.0-or-later"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.88"
[lints.clippy]
# This style lint is version-dependent and produces over 100 legacy-only diagnostics on Rust 1.88.
uninlined_format_args = "allow"
[lib]
name = "app_lib"
+1 -1
View File
@@ -1691,7 +1691,7 @@ pub fn get_vault_stats(state: State<'_, AppState>) -> Result<VaultStats, String>
.filter(|p| {
// attachments under .helixnotes count; nothing else in .helixnotes or .trash does
let s = p.to_string_lossy();
!(s.contains("/.helixnotes/") && !s.contains("/.helixnotes/attachments/"))
(!s.contains("/.helixnotes/") || s.contains("/.helixnotes/attachments/"))
&& !s.contains("/.trash/")
})
.collect();
+5 -4
View File
@@ -141,11 +141,12 @@ fn image_client(host: &str, addresses: &[SocketAddr]) -> Result<Client, ProxyErr
Client::builder()
.timeout(Duration::from_secs(30))
.redirect(Policy::custom(move |attempt| {
let redirected_elsewhere = match attempt.url().host_str() {
Some(host) => normalized_host(host) != redirect_host,
None => true,
};
if attempt.previous().len() >= 5
|| attempt
.url()
.host_str()
.map_or(true, |host| normalized_host(host) != redirect_host)
|| redirected_elsewhere
|| validate_url(attempt.url().as_str()).is_err()
{
attempt.stop()
+8 -2
View File
@@ -528,8 +528,14 @@ fn apply_changes(
match (l, r) {
(Some(lf), Some(re)) => {
let local_changed = m.map_or(true, |me| me.local_hash != lf.hash);
let remote_changed = m.map_or(true, |me| &me.remote_etag != re);
let local_changed = match m {
Some(entry) => entry.local_hash != lf.hash,
None => true,
};
let remote_changed = match m {
Some(entry) => &entry.remote_etag != re,
None => true,
};
if !local_changed && !remote_changed {
new_m.files.insert(
key.clone(),
+2 -4
View File
@@ -251,10 +251,8 @@ fn rename_deprecated_properties(raw: &str) -> String {
mapping.insert(new_key, val);
renamed = true;
}
} else {
if mapping.remove(&old_key).is_some() {
renamed = true;
}
} else if mapping.remove(&old_key).is_some() {
renamed = true;
}
}