Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a56b66

Browse filesBrowse files
committed
clippy fix
1 parent c2613f6 commit 2a56b66
Copy full SHA for 2a56b66

File tree

1 file changed

+3
-1
lines changed
Filter options

1 file changed

+3
-1
lines changed

‎stdlib/src/bz2.rs

Copy file name to clipboardExpand all lines: stdlib/src/bz2.rs
+3-1Lines changed: 3 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.