-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adhere to Clippy provided suggestions
Implement a couple of suggestions made by Clippy in newer versions of Rust.
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2022 Daniel Mueller ([email protected]) | ||
// Copyright (C) 2022-2025 Daniel Mueller ([email protected]) | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
//! A module providing the means for protecting the contents of a | ||
|
@@ -302,7 +302,7 @@ pub struct FileCap<'cap> { | |
_phantom: PhantomData<&'cap ()>, | ||
} | ||
|
||
impl<'cap> FileCap<'cap> { | ||
impl FileCap<'_> { | ||
/// Create a new [`FileCap`] for the provided path. | ||
fn new(path: PathBuf) -> Self { | ||
Self { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2022-2024 Daniel Mueller ([email protected]) | ||
// Copyright (C) 2022-2025 Daniel Mueller ([email protected]) | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
use std::cell::Cell; | ||
|
@@ -806,7 +806,7 @@ pub mod tests { | |
|
||
for item in items.iter() { | ||
assert!(db | ||
.try_insert(black_box(0), black_box(item.clone())) | ||
.try_insert(black_box(0), black_box(Rc::clone(item))) | ||
.is_some()); | ||
} | ||
}); | ||
|
@@ -837,7 +837,7 @@ pub mod tests { | |
let () = db.data.reserve(ITEM_CNT); | ||
|
||
for item in items.iter() { | ||
assert!(db.try_push(black_box(Rc::clone(&item))).is_some()); | ||
assert!(db.try_push(black_box(Rc::clone(item))).is_some()); | ||
} | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2017-2024 Daniel Mueller ([email protected]) | ||
// Copyright (C) 2017-2025 Daniel Mueller ([email protected]) | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
use std::rc::Rc; | ||
|
@@ -123,7 +123,7 @@ impl<'tasks> Iterator for Filter<'tasks> { | |
} | ||
} | ||
|
||
impl<'tasks> DoubleEndedIterator for Filter<'tasks> { | ||
impl DoubleEndedIterator for Filter<'_> { | ||
fn next_back(&mut self) -> Option<Self::Item> { | ||
loop { | ||
match self.iter.next_back() { | ||
|