comparison rust/hg-core/src/revlog/nodemap_docket.rs @ 51117:532e74ad3ff6

rust: run a clippy pass with the latest stable version Our current version of clippy is older than the latest stable. The newest version has new lints that are moslty good advice, so let's apply them ahead of time. This has the added benefit of reducing the noise for developpers like myself that use clippy as an IDE helper, as well as being more prepared for a future clippy upgrade.
author Rapha?l Gom?s <rgomes@octobus.net>
date Mon, 06 Nov 2023 11:06:08 +0100
parents 048f829a445a
children db7dbe6f7bb2
comparison
equal deleted inserted replaced
51116:d58e754f2db0 51117:532e74ad3ff6
73 73
74 let data_path = rawdata_path(&docket_path, uid); 74 let data_path = rawdata_path(&docket_path, uid);
75 // TODO: use `vfs.read()` here when the `persistent-nodemap.mmap` 75 // TODO: use `vfs.read()` here when the `persistent-nodemap.mmap`
76 // config is false? 76 // config is false?
77 if let Some(mmap) = 77 if let Some(mmap) =
78 store_vfs.mmap_open(&data_path).io_not_found_as_none()? 78 store_vfs.mmap_open(data_path).io_not_found_as_none()?
79 { 79 {
80 if mmap.len() >= data_length { 80 if mmap.len() >= data_length {
81 Ok(Some((docket, mmap))) 81 Ok(Some((docket, mmap)))
82 } else { 82 } else {
83 Err(HgError::corrupted("persistent nodemap too short")) 83 Err(HgError::corrupted("persistent nodemap too short"))