fix more clippy warnings
This commit is contained in:
parent
2911282c36
commit
0820cc4fe2
2 changed files with 3 additions and 7 deletions
|
@ -1112,9 +1112,8 @@ mod test {
|
||||||
v.extend_from_slice(include_bytes!("../tests/data/mimetype.zip"));
|
v.extend_from_slice(include_bytes!("../tests/data/mimetype.zip"));
|
||||||
let mut reader = io::Cursor::new(v);
|
let mut reader = io::Cursor::new(v);
|
||||||
loop {
|
loop {
|
||||||
match read_zipfile_from_stream(&mut reader).unwrap() {
|
if read_zipfile_from_stream(&mut reader).unwrap().is_none() {
|
||||||
None => break,
|
break;
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,10 +273,7 @@ impl ZipFileData {
|
||||||
|
|
||||||
::std::path::Path::new(&filename)
|
::std::path::Path::new(&filename)
|
||||||
.components()
|
.components()
|
||||||
.filter(|component| match *component {
|
.filter(|component| matches!(*component, ::std::path::Component::Normal(..)))
|
||||||
::std::path::Component::Normal(..) => true,
|
|
||||||
_ => false,
|
|
||||||
})
|
|
||||||
.fold(::std::path::PathBuf::new(), |mut path, ref cur| {
|
.fold(::std::path::PathBuf::new(), |mut path, ref cur| {
|
||||||
path.push(cur.as_os_str());
|
path.push(cur.as_os_str());
|
||||||
path
|
path
|
||||||
|
|
Loading…
Add table
Reference in a new issue