all: use let chains
This commit is contained in:
parent
3d5d146d65
commit
286857971a
89 changed files with 1516 additions and 1574 deletions
|
|
@ -19,10 +19,10 @@ unsafe fn get_extensions(ext: *const c::c_char) -> Option<AHashSet<String>> {
|
|||
let ext = unsafe { CStr::from_ptr(ext).to_bytes() };
|
||||
for part in ext.split_str(" ") {
|
||||
let name = part.trim_ascii();
|
||||
if name.len() > 0 {
|
||||
if let Ok(s) = str::from_utf8(name) {
|
||||
res.insert(s.to_string());
|
||||
}
|
||||
if name.len() > 0
|
||||
&& let Ok(s) = str::from_utf8(name)
|
||||
{
|
||||
res.insert(s.to_string());
|
||||
}
|
||||
}
|
||||
Some(res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue