diff --git a/audio/src/decrypt.rs b/audio/src/decrypt.rs index 616ef4f6..17f4edba 100644 --- a/audio/src/decrypt.rs +++ b/audio/src/decrypt.rs @@ -18,8 +18,8 @@ pub struct AudioDecrypt { impl AudioDecrypt { pub fn new(key: AudioKey, reader: T) -> AudioDecrypt { let cipher = Aes128Ctr::new( - &GenericArray::from_slice(&key.0), - &GenericArray::from_slice(&AUDIO_AESIV), + GenericArray::from_slice(&key.0), + GenericArray::from_slice(&AUDIO_AESIV), ); AudioDecrypt { cipher, reader } } diff --git a/connect/src/spirc.rs b/connect/src/spirc.rs index 57dc4cdd..9c541871 100644 --- a/connect/src/spirc.rs +++ b/connect/src/spirc.rs @@ -1033,7 +1033,7 @@ impl SpircTask { .payload .first() .expect("Empty payload on context uri"); - let response: serde_json::Value = serde_json::from_slice(&data).unwrap(); + let response: serde_json::Value = serde_json::from_slice(data).unwrap(); Ok(response) } @@ -1051,7 +1051,7 @@ impl SpircTask { if let Some(head) = track_vec.len().checked_sub(CONTEXT_TRACKS_HISTORY) { track_vec.drain(0..head); } - track_vec.extend_from_slice(&new_tracks); + track_vec.extend_from_slice(new_tracks); self.state .set_track(protobuf::RepeatedField::from_vec(track_vec)); @@ -1218,7 +1218,7 @@ impl SpircTask { trace!("Sending status to server: [{}]", status_string); let mut cs = CommandSender::new(self, MessageType::kMessageTypeNotify); if let Some(s) = recipient { - cs = cs.recipient(&s); + cs = cs.recipient(s); } cs.send(); } diff --git a/core/src/connection/handshake.rs b/core/src/connection/handshake.rs index 82ec7672..eddcd327 100644 --- a/core/src/connection/handshake.rs +++ b/core/src/connection/handshake.rs @@ -124,7 +124,7 @@ fn compute_keys(shared_secret: &[u8], packets: &[u8]) -> (Vec, Vec, Vec< let mut data = Vec::with_capacity(0x64); for i in 1..6 { let mut mac = - HmacSha1::new_from_slice(&shared_secret).expect("HMAC can take key of any size"); + HmacSha1::new_from_slice(shared_secret).expect("HMAC can take key of any size"); mac.update(packets); mac.update(&[i]); data.extend_from_slice(&mac.finalize().into_bytes()); diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index d328a7d9..cf663ce6 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -126,7 +126,7 @@ pub trait Metadata: Send + Sized + 'static { let data = response.payload.first().expect("Empty payload"); let msg = Self::Message::parse_from_bytes(data).unwrap(); - Ok(Self::parse(&msg, &session)) + Ok(Self::parse(&msg, session)) } } diff --git a/playback/src/audio_backend/alsa.rs b/playback/src/audio_backend/alsa.rs index 7b5987a3..8b8962fb 100644 --- a/playback/src/audio_backend/alsa.rs +++ b/playback/src/audio_backend/alsa.rs @@ -59,7 +59,7 @@ fn list_outputs() -> io::Result<()> { println!("Listing available Alsa outputs:"); for t in &["pcm", "ctl", "hwdep"] { println!("{} devices:", t); - let i = match HintIter::new_str(None, &t) { + let i = match HintIter::new_str(None, t) { Ok(i) => i, Err(e) => { return Err(io::Error::new(io::ErrorKind::Other, e));