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:
parent
427efa21b9
commit
9075db0c10
3 changed files with 4 additions and 9 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue