Mercurial > public > mercurial-scm > hg-stable
diff rust/hg-core/src/revlog/index.rs @ 51766:ec7171748350
rust: apply clippy lints
They are at most harmless and at best make the codebase more readable and
simpler.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 18 Jul 2024 13:35:39 +0200 |
parents | 7f0cb9ee0534 |
children | 06549ab4281b |
line wrap: on
line diff
--- a/rust/hg-core/src/revlog/index.rs Tue Jul 23 14:25:23 2024 +0200 +++ b/rust/hg-core/src/revlog/index.rs Thu Jul 18 13:35:39 2024 +0200 @@ -1387,6 +1387,7 @@ fn vec_of_empty(sets_size: usize, vec_len: usize) -> Vec<Self>; /// The size of the bit mask in memory + #[allow(unused)] fn size(&self) -> usize; /// The number of elements that can be represented in the set. @@ -1394,12 +1395,14 @@ /// Another way to put it is that it is the highest integer `C` such that /// the set is guaranteed to always be a subset of the integer range /// `[0, C)` + #[allow(unused)] fn capacity(&self) -> usize; /// Declare `n` to belong to the set fn add(&mut self, n: usize); /// Declare `n` not to belong to the set + #[allow(unused)] fn discard(&mut self, n: usize); /// Replace this bit set by its union with other @@ -1749,6 +1752,9 @@ } #[cfg(test)] +pub use tests::IndexEntryBuilder; + +#[cfg(test)] mod tests { use super::*; use crate::node::NULL_NODE; @@ -2027,6 +2033,3 @@ assert_eq!(get_version(&bytes), 2) } } - -#[cfg(test)] -pub use tests::IndexEntryBuilder;