mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 13:45:12 +02:00
refactor: fix clippy error
This commit is contained in:
parent
b33ea11af2
commit
c7edad91ed
@ -163,8 +163,7 @@ impl ProcessQuery for ProcWidgetState {
|
||||
compare_prefix: None,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if queue_top == "(" {
|
||||
} else if queue_top == "(" {
|
||||
if query.is_empty() {
|
||||
return Err(QueryError("Missing closing parentheses".into()));
|
||||
}
|
||||
@ -257,10 +256,7 @@ impl ProcessQuery for ProcWidgetState {
|
||||
PrefixType::Name => {
|
||||
return Ok(Prefix {
|
||||
or: None,
|
||||
regex_prefix: Some((
|
||||
prefix_type,
|
||||
StringQuery::Value(content),
|
||||
)),
|
||||
regex_prefix: Some((prefix_type, StringQuery::Value(content))),
|
||||
compare_prefix: None,
|
||||
})
|
||||
}
|
||||
@ -345,8 +341,7 @@ impl ProcessQuery for ProcWidgetState {
|
||||
| PrefixType::TRead
|
||||
| PrefixType::TWrite => {
|
||||
if let Some(potential_unit) = query.front() {
|
||||
match potential_unit.to_lowercase().as_str()
|
||||
{
|
||||
match potential_unit.to_lowercase().as_str() {
|
||||
"tb" => {
|
||||
value *= 1_000_000_000_000.0;
|
||||
query.pop_front();
|
||||
@ -406,7 +401,6 @@ impl ProcessQuery for ProcWidgetState {
|
||||
return Err(QueryError("Missing argument for search prefix".into()));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if inside_quotation {
|
||||
// Uh oh, it's empty with quotes!
|
||||
return Err(QueryError("Missing closing quotation".into()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user