mirror of
https://github.com/atuinsh/atuin.git
synced 2025-08-19 03:16:54 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user