Apply Clippy suggestions (#15549)

While working on other PRs, I noticed that Clippy had some suggestions
(warnings). This PR fixes those warnings.
This commit is contained in:
Robin Malfait 2025-01-06 11:59:31 +01:00 • committed by GitHub
parent 427efa21b9
commit 9075db0c10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 9 deletions

View file

@ -67,7 +67,7 @@ impl<'a> Cursor<'a> {
}
}
impl<'a> Display for Cursor<'a> {
impl Display for Cursor<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let len = self.input.len().to_string();

View file

@ -204,7 +204,7 @@ impl<'a> Extractor<'a> {
}
#[inline(always)]
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate {
fn split_candidate(candidate: &'a [u8]) -> SplitCandidate<'a> {
let mut brackets = 0;
let mut idx_end = 0;

View file

@ -95,13 +95,8 @@ impl DetectSources {
)
.into_iter();
loop {
// We are only interested in valid entries
let entry = match it.next() {
Some(Ok(entry)) => entry,
_ => break,
};
// We are only interested in valid entries
while let Some(Ok(entry)) = it.next() {
// Ignore known directories that we don't want to traverse into.
if entry.file_type().is_dir() && entry.file_name() == ".git" {
it.skip_current_dir();