melib/shellexpand: fix infinite loop bug
Introduced in recent "fixing clippy lints" commitmaster
parent
ba7f5dce1c
commit
1dc1d86848
|
@ -131,11 +131,11 @@ impl ShellExpandTrait for Path {
|
|||
};
|
||||
|
||||
let Ok(n) = usize::try_from(n) else {
|
||||
if n == 0 {
|
||||
break;
|
||||
}
|
||||
return SmallVec::new();
|
||||
};
|
||||
if n == 0 {
|
||||
break;
|
||||
}
|
||||
unsafe {
|
||||
buf.set_len(n);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue