This commit is contained in:
veeso
2021-03-27 12:17:35 +01:00
parent 67e36fa38f
commit 55e884889c
16 changed files with 64 additions and 156 deletions

View File

@@ -510,10 +510,10 @@ impl Formatter {
None => None,
};
// Match format extra: group 2 + 1
let fmt_extra: Option<String> = match &regex_match.get(5) {
Some(extra) => Some(extra.as_str().to_string()),
None => None,
};
let fmt_extra: Option<String> = regex_match
.get(5)
.as_ref()
.map(|extra| extra.as_str().to_string());
// Create a callchain or push new element to its back
match callchain.as_mut() {
None => {

View File

@@ -190,10 +190,7 @@ impl FileExplorer {
pass
})
.collect::<Vec<_>>();
match filtered.get(idx) {
None => None,
Some(file) => Some(file),
}
filtered.get(idx).copied()
}
// Formatting