return the boolean value directly instead of using if-else
Previous patch introduced something like if x {true} else {false} which can be simply replaced by returning x here. Thanks to @kennytm for spotting it.
This commit is contained in:
parent
fd075c6f21
commit
1e436eb236
@ -570,11 +570,7 @@ impl Config {
|
||||
// returns whether this line contains this prefix or not. For prefix
|
||||
// "ignore", returns true if line says "ignore-x86_64", "ignore-arch",
|
||||
// "ignore-andorid" etc.
|
||||
if line.starts_with(prefix) && line.as_bytes().get(prefix.len()) == Some(&b'-') {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
line.starts_with(prefix) && line.as_bytes().get(prefix.len()) == Some(&b'-')
|
||||
}
|
||||
|
||||
fn parse_name_directive(&self, line: &str, directive: &str) -> bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user