some corrections

This commit is contained in:
gurkenhabicht 2020-05-25 00:54:45 +02:00
parent 0f7f196b24
commit c5e99f8afb
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ async fn main() -> Result<(), Error> {
println!("{:?}: {:?}, {:?}", entry.path(), file_type, entry.metadata().unwrap().permissions()); println!("{:?}: {:?}, {:?}", entry.path(), file_type, entry.metadata().unwrap().permissions());
if entry.metadata().unwrap().is_file() { if entry.metadata().unwrap().is_file() {
let mut magic_number: [u8;4] = [0;4]; let mut magic_number: [u8;4] = [0;4];
let signature = File::open(entry.path().to_owned()).unwrap().read_exact(&mut magic_number).unwrap(); let _signature = File::open(entry.path().to_owned()).unwrap().read_exact(&mut magic_number).unwrap();
match magic_number { match magic_number {
PCAPNG_SIGNATURE => println!("pcapng!"), PCAPNG_SIGNATURE => println!("pcapng!"),
PCAP_SIGNATURE => println!("pcap!"), PCAP_SIGNATURE => println!("pcap!"),