Fix clippy warnings

This commit is contained in:
Roderick van Domburg 2021-06-23 21:43:23 +02:00
parent aa4cc0bee6
commit e58934849f
No known key found for this signature in database
GPG key ID: 7076AA781B43EFE6
3 changed files with 3 additions and 5 deletions

View file

@ -62,8 +62,8 @@ impl AudioKeyManager {
fn send_key_request(&self, seq: u32, track: SpotifyId, file: FileId) { fn send_key_request(&self, seq: u32, track: SpotifyId, file: FileId) {
let mut data: Vec<u8> = Vec::new(); let mut data: Vec<u8> = Vec::new();
data.write(&file.0).unwrap(); data.write_all(&file.0).unwrap();
data.write(&track.to_raw()).unwrap(); data.write_all(&track.to_raw()).unwrap();
data.write_u32::<BigEndian>(seq).unwrap(); data.write_u32::<BigEndian>(seq).unwrap();
data.write_u16::<BigEndian>(0x0000).unwrap(); data.write_u16::<BigEndian>(0x0000).unwrap();

View file

@ -1,5 +1,3 @@
#![allow(clippy::unused_io_amount)]
#[macro_use] #[macro_use]
extern crate log; extern crate log;
extern crate num_derive; extern crate num_derive;

View file

@ -79,7 +79,7 @@ impl MercuryRequest {
for p in &self.payload { for p in &self.payload {
packet.write_u16::<BigEndian>(p.len() as u16).unwrap(); packet.write_u16::<BigEndian>(p.len() as u16).unwrap();
packet.write(p).unwrap(); packet.write_all(p).unwrap();
} }
packet packet