| commit | 831b02fc6b6f84143323c0ba0228dac93c40023d | [log] [tgz] |
|---|---|---|
| author | David Tolnay <dtolnay@gmail.com> | Tue Dec 29 15:17:52 2020 -0800 |
| committer | David Tolnay <dtolnay@gmail.com> | Tue Dec 29 15:19:55 2020 -0800 |
| tree | 272a81dea729fc48191bc973d0048e066fd05a6b | |
| parent | 515cef80447d7bd1fc46de88ce672015142b6b9d [diff] [blame] |
Resolve clippy map_unwrap_or lint in demo
diff --git a/demo/src/main.rs b/demo/src/main.rs index dca596a..458f1f2 100644 --- a/demo/src/main.rs +++ b/demo/src/main.rs
@@ -38,7 +38,7 @@ pub fn next_chunk(buf: &mut MultiBuf) -> &[u8] { let next = buf.chunks.get(buf.pos); buf.pos += 1; - next.map(Vec::as_slice).unwrap_or(&[]) + next.map_or(&[], Vec::as_slice) } fn main() {