Skip to content

Commit

Permalink
Fix clippy lints (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulhauner authored Dec 5, 2024
1 parent 36a0971 commit a3f8137
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<T: Value> Builder<T> {

let length = self.length.as_usize();
let level_capacity = 1 << self.level;
let mut next_index_on_level = (length + level_capacity - 1) / level_capacity;
let mut next_index_on_level = length.div_ceil(level_capacity);

// Finish any partially-filled packed leaf.
if let Some(packing_factor) = self.packing_factor {
Expand Down
6 changes: 3 additions & 3 deletions src/cow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub enum Cow<'a, T: Clone> {
Vec(VecCow<'a, T>),
}

impl<'a, T: Clone> Deref for Cow<'a, T> {
impl<T: Clone> Deref for Cow<'_, T> {
type Target = T;

fn deref(&self) -> &T {
Expand Down Expand Up @@ -77,7 +77,7 @@ impl<'a, T: Clone> CowTrait<'a, T> for BTreeCow<'a, T> {
}
}

impl<'a, T: Clone> Deref for BTreeCow<'a, T> {
impl<T: Clone> Deref for BTreeCow<'_, T> {
type Target = T;

fn deref(&self) -> &T {
Expand Down Expand Up @@ -125,7 +125,7 @@ impl<'a, T: Clone> CowTrait<'a, T> for VecCow<'a, T> {
}
}

impl<'a, T: Clone> Deref for VecCow<'a, T> {
impl<T: Clone> Deref for VecCow<'_, T> {
type Target = T;

fn deref(&self) -> &T {
Expand Down
4 changes: 2 additions & 2 deletions src/interface_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl<'a, T: Value, U: UpdateMap<T>> Iterator for InterfaceIter<'a, T, U> {
}
}

impl<'a, T: Value, U: UpdateMap<T>> ExactSizeIterator for InterfaceIter<'a, T, U> {}
impl<T: Value, U: UpdateMap<T>> ExactSizeIterator for InterfaceIter<'_, T, U> {}

#[derive(Debug)]
pub struct InterfaceIterCow<'a, T: Value, U: UpdateMap<T>> {
Expand All @@ -38,7 +38,7 @@ pub struct InterfaceIterCow<'a, T: Value, U: UpdateMap<T>> {
pub(crate) index: usize,
}

impl<'a, T: Value, U: UpdateMap<T>> InterfaceIterCow<'a, T, U> {
impl<T: Value, U: UpdateMap<T>> InterfaceIterCow<'_, T, U> {
pub fn next_cow(&mut self) -> Option<(usize, Cow<T>)> {
let index = self.index;
self.index += 1;
Expand Down
2 changes: 1 addition & 1 deletion src/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ impl<'a, T: Value> Iterator for Iter<'a, T> {
}
}

impl<'a, T: Value> ExactSizeIterator for Iter<'a, T> {}
impl<T: Value> ExactSizeIterator for Iter<'_, T> {}

0 comments on commit a3f8137

Please sign in to comment.