mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-09-19 17:37:29 +02:00
chore: set Rust MSRV to 1.88
This commit is contained in:
@@ -166,7 +166,7 @@ Full documentation: [helixnotes.com/docs](https://helixnotes.com/docs.html)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Rust](https://rustup.rs/) (1.77+)
|
||||
- [Rust](https://rustup.rs/) (1.88+)
|
||||
- [Node.js](https://nodejs.org/) (18+)
|
||||
- [pnpm](https://pnpm.io/)
|
||||
- System dependencies for Tauri: see [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user