Skip to content

Commit fbe1cef

Browse files
committed
clippy fix
1 parent c67fe4a commit fbe1cef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/src/bz2.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ mod _bz2 {
111111
unused_data.replace(input_buffer.clone());
112112
// skrink the vector to save memory
113113
input_buffer.shrink_to_fit();
114-
unused_data.as_mut().map(|v| v.shrink_to_fit());
114+
if let Some(v) = unused_data.as_mut() {
115+
v.shrink_to_fit();
116+
}
115117

116118
if *eof {
117119
*needs_input = false;

0 commit comments

Comments
 (0)