Clippy fixes for new Rust version (#3392)

This commit is contained in:
JT
2021-05-07 07:58:21 +12:00
committed by GitHub
parent 0f8e31af06
commit 91a929b2a9
19 changed files with 109 additions and 158 deletions

View File

@ -59,8 +59,8 @@ impl NuConfig {
};
Ok(NuConfig {
file_path,
vars,
file_path,
modified_at,
})
}

View File

@ -16,19 +16,11 @@ pub struct Labels {
impl Labels {
pub fn at(&self, idx: usize) -> Option<&str> {
if let Some(k) = self.x.get(idx) {
Some(&k[..])
} else {
None
}
self.x.get(idx).map(|k| &k[..])
}
pub fn at_split(&self, idx: usize) -> Option<&str> {
if let Some(k) = self.y.get(idx) {
Some(&k[..])
} else {
None
}
self.y.get(idx).map(|k| &k[..])
}
pub fn grouped(&self) -> impl Iterator<Item = &String> {