Smalll fix of warning and mistype.

This commit is contained in:
Kirill Shakirov
2026-02-13 19:43:22 +01:00
parent 3dc3ce7e62
commit 0e318415a7
2 changed files with 3 additions and 5 deletions
+3 -3
View File
@@ -465,12 +465,12 @@ fn db_get_progress(db: &Database) -> Result<f64, redb::Error> {
fn db_init(db: &Database) -> Result<(), redb::Error> { fn db_init(db: &Database) -> Result<(), redb::Error> {
let transct: redb::WriteTransaction = db.begin_write()?; let transct: redb::WriteTransaction = db.begin_write()?;
{ {
let ranges = transct.open_table(RANGES)?; let mut ranges = transct.open_table(RANGES)?;
let ranges_to_use = transct.open_table(RANGES_TO_USE)?; let mut ranges_to_use = transct.open_table(RANGES_TO_USE)?;
// create new ranges // create new ranges
for r_id in 0..=u16::MAX { for r_id in 0..=u16::MAX {
let r = RangeRecord::new(id); let r = RangeRecord::new(r_id);
ranges.insert(r_id, r.value())?; ranges.insert(r_id, r.value())?;
ranges_to_use.insert(r_id, ())?; ranges_to_use.insert(r_id, ())?;
} }
-2
View File
@@ -111,8 +111,6 @@ fn bignum_to_hex(a: &[u32; 8]) -> String {
#[cfg(test)] #[cfg(test)]
mod num_utils_tests { mod num_utils_tests {
use std::io::Read;
use super::*; use super::*;
#[test] #[test]