Fix clippy lint and disable broken lint (#3865)

This commit is contained in:
JT
2021-07-30 08:11:47 +12:00
committed by GitHub
parent 9696e4d315
commit e602647d4d
28 changed files with 52 additions and 52 deletions

View File

@ -20,12 +20,12 @@ fn build_path(head: &str, members: &Path, entry: &str) -> String {
fn collect_entries(value_fs: &ValueShell, head: &str, path: &Path) -> Vec<String> {
value_fs
.members_under(&path)
.members_under(path)
.iter()
.flat_map(|entry| {
entry
.row_entries()
.map(|(entry_name, _)| build_path(&head, &path, entry_name))
.map(|(entry_name, _)| build_path(head, path, entry_name))
})
.collect()
}
@ -62,7 +62,7 @@ where
.or_else(|| {
path.parent().map(|parent| {
fs.find(parent)
.map(|fs| collect_entries(fs, &head, &parent))
.map(|fs| collect_entries(fs, &head, parent))
.unwrap_or_default()
})
})
@ -72,7 +72,7 @@ where
})
.flatten()
.filter_map(|candidate| {
if matcher.matches(&partial, &candidate) {
if matcher.matches(partial, &candidate) {
Some(Suggestion::new(&candidate, &candidate))
} else {
None
@ -107,7 +107,7 @@ mod tests {
}
fn source(&self) -> &nu_engine::EvaluationContext {
&self.0
self.0
}
fn scope(&self) -> &dyn nu_parser::ParserScope {