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
|
### Prerequisites
|
||||||
|
|
||||||
- [Rust](https://rustup.rs/) (1.77+)
|
- [Rust](https://rustup.rs/) (1.88+)
|
||||||
- [Node.js](https://nodejs.org/) (18+)
|
- [Node.js](https://nodejs.org/) (18+)
|
||||||
- [pnpm](https://pnpm.io/)
|
- [pnpm](https://pnpm.io/)
|
||||||
- System dependencies for Tauri: see [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/)
|
- 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"]
|
authors = ["HelixNotes"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
edition = "2021"
|
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]
|
[lib]
|
||||||
name = "app_lib"
|
name = "app_lib"
|
||||||
|
|||||||
@@ -1691,7 +1691,7 @@ pub fn get_vault_stats(state: State<'_, AppState>) -> Result<VaultStats, String>
|
|||||||
.filter(|p| {
|
.filter(|p| {
|
||||||
// attachments under .helixnotes count; nothing else in .helixnotes or .trash does
|
// attachments under .helixnotes count; nothing else in .helixnotes or .trash does
|
||||||
let s = p.to_string_lossy();
|
let s = p.to_string_lossy();
|
||||||
!(s.contains("/.helixnotes/") && !s.contains("/.helixnotes/attachments/"))
|
(!s.contains("/.helixnotes/") || s.contains("/.helixnotes/attachments/"))
|
||||||
&& !s.contains("/.trash/")
|
&& !s.contains("/.trash/")
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|||||||
@@ -141,11 +141,12 @@ fn image_client(host: &str, addresses: &[SocketAddr]) -> Result<Client, ProxyErr
|
|||||||
Client::builder()
|
Client::builder()
|
||||||
.timeout(Duration::from_secs(30))
|
.timeout(Duration::from_secs(30))
|
||||||
.redirect(Policy::custom(move |attempt| {
|
.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
|
if attempt.previous().len() >= 5
|
||||||
|| attempt
|
|| redirected_elsewhere
|
||||||
.url()
|
|
||||||
.host_str()
|
|
||||||
.map_or(true, |host| normalized_host(host) != redirect_host)
|
|
||||||
|| validate_url(attempt.url().as_str()).is_err()
|
|| validate_url(attempt.url().as_str()).is_err()
|
||||||
{
|
{
|
||||||
attempt.stop()
|
attempt.stop()
|
||||||
|
|||||||
@@ -528,8 +528,14 @@ fn apply_changes(
|
|||||||
|
|
||||||
match (l, r) {
|
match (l, r) {
|
||||||
(Some(lf), Some(re)) => {
|
(Some(lf), Some(re)) => {
|
||||||
let local_changed = m.map_or(true, |me| me.local_hash != lf.hash);
|
let local_changed = match m {
|
||||||
let remote_changed = m.map_or(true, |me| &me.remote_etag != re);
|
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 {
|
if !local_changed && !remote_changed {
|
||||||
new_m.files.insert(
|
new_m.files.insert(
|
||||||
key.clone(),
|
key.clone(),
|
||||||
|
|||||||
@@ -251,12 +251,10 @@ fn rename_deprecated_properties(raw: &str) -> String {
|
|||||||
mapping.insert(new_key, val);
|
mapping.insert(new_key, val);
|
||||||
renamed = true;
|
renamed = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else if mapping.remove(&old_key).is_some() {
|
||||||
if mapping.remove(&old_key).is_some() {
|
|
||||||
renamed = true;
|
renamed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if !renamed {
|
if !renamed {
|
||||||
return raw.to_string();
|
return raw.to_string();
|
||||||
|
|||||||
Reference in New Issue
Block a user