Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy lints for Rust 1.83 #55

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> {}
Loading