refactor(lib): replace Vec::set_len(0) with clear
This commit is contained in:
committed by
Sean McArthur
parent
069a32b1ac
commit
c837fb9c29
@@ -1525,10 +1525,7 @@ mod tests {
|
||||
assert_eq!(vec.len(), len);
|
||||
::test::black_box(&vec);
|
||||
|
||||
// reset Vec<u8> to 0 (always safe)
|
||||
unsafe {
|
||||
vec.set_len(0);
|
||||
}
|
||||
vec.clear();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user