aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2025-03-25 15:18:10 +0000
committerGitHub <noreply@github.com>2025-03-25 15:18:10 +0000
commite8df3d168e7fb9d6f99d97eb40eb7110bc9a4d61 (patch)
tree793dd25139ee5ff0c2c985541bc12f2e33249a06 /crates/atuin-client
parentfeat(zsh): re-enable bracketed paste (#2646) (diff)
downloadatuin-e8df3d168e7fb9d6f99d97eb40eb7110bc9a4d61.zip
fix: typeerror in client sync code (#2647)
* fix: typeerror in client sync code Fixes #2645 This is really weird 1. I have not touched this code in _years_. It has not changed. In recent rust versions, it has a typeerror (see linked issue) 2. This does not occur when running `cargo build`, in release mode or otherwise. It only occurs with `cargo install` 3. I can't find any other occurences of this typeerror online - unsure if it is a compiler regression? The code here is not very complex at all. * chore(clippy): remove unused imports
Diffstat (limited to 'crates/atuin-client')
-rw-r--r--crates/atuin-client/src/sync.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/atuin-client/src/sync.rs b/crates/atuin-client/src/sync.rs
index 2b099ae4..ac63c2c0 100644
--- a/crates/atuin-client/src/sync.rs
+++ b/crates/atuin-client/src/sync.rs
@@ -1,5 +1,4 @@
use std::collections::HashSet;
-use std::convert::TryInto;
use std::iter::FromIterator;
use eyre::Result;
@@ -85,8 +84,9 @@ async fn sync_download(
db.save_bulk(&history).await?;
local_count = db.history_count(true).await?;
+ let remote_page_size = std::cmp::max(remote_status.page_size, 0) as usize;
- if history.len() < remote_status.page_size.try_into().unwrap() {
+ if history.len() < remote_page_size {
break;
}