Skip to content

Commit

Permalink
Merge pull request #1270 from yubiuser/fix/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
roderickvd authored May 11, 2024
2 parents 43269cf + 63e2490 commit a5964c2
Show file tree
Hide file tree
Showing 22 changed files with 10 additions and 38 deletions.
3 changes: 1 addition & 2 deletions connect/src/spirc.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
future::Future,
pin::Pin,
sync::atomic::{AtomicUsize, Ordering},
Expand All @@ -9,7 +8,7 @@ use std::{

use futures_util::{stream::FusedStream, FutureExt, StreamExt};

use protobuf::{self, Message};
use protobuf::Message;
use rand::prelude::SliceRandom;
use thiserror::Error;
use tokio::sync::mpsc;
Expand Down
5 changes: 1 addition & 4 deletions core/src/cdn_url.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::{
convert::TryFrom,
ops::{Deref, DerefMut},
};
use std::ops::{Deref, DerefMut};

use protobuf::Message;
use thiserror::Error;
Expand Down
2 changes: 1 addition & 1 deletion core/src/connection/handshake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::{env::consts::ARCH, io};

use byteorder::{BigEndian, ByteOrder, WriteBytesExt};
use hmac::{Hmac, Mac};
use protobuf::{self, Message};
use protobuf::Message;
use rand::{thread_rng, RngCore};
use rsa::{BigUint, Pkcs1v15Sign, RsaPublicKey};
use sha1::{Digest, Sha1};
Expand Down
2 changes: 1 addition & 1 deletion core/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::io;

use futures_util::{SinkExt, StreamExt};
use num_traits::FromPrimitive;
use protobuf::{self, Message};
use protobuf::Message;
use thiserror::Error;
use tokio::net::TcpStream;
use tokio_util::codec::Framed;
Expand Down
2 changes: 1 addition & 1 deletion core/src/date.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{convert::TryFrom, fmt::Debug, ops::Deref};
use std::{fmt::Debug, ops::Deref};

use time::{
error::ComponentRange, format_description::well_known::Iso8601, Date as _Date, OffsetDateTime,
Expand Down
8 changes: 1 addition & 7 deletions core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,13 +513,7 @@ impl Session {
}

pub fn get_user_attribute(&self, key: &str) -> Option<String> {
self.0
.data
.read()
.user_data
.attributes
.get(key)
.map(Clone::clone)
self.0.data.read().user_data.attributes.get(key).cloned()
}

fn weak(&self) -> SessionWeak {
Expand Down
6 changes: 1 addition & 5 deletions core/src/spotify_id.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt,
ops::Deref,
};
use std::{fmt, ops::Deref};

use thiserror::Error;

Expand Down
1 change: 0 additions & 1 deletion metadata/src/album.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/artist.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/availability.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/episode.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/image.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/playlist/annotation.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::convert::TryFrom;
use std::fmt::Debug;

use protobuf::Message;
Expand Down
1 change: 0 additions & 1 deletion metadata/src/playlist/attribute.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::{
collections::HashMap,
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
2 changes: 1 addition & 1 deletion metadata/src/playlist/diff.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{convert::TryFrom, fmt::Debug};
use std::fmt::Debug;

use super::operation::PlaylistOperations;

Expand Down
1 change: 0 additions & 1 deletion metadata/src/playlist/item.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/playlist/list.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/playlist/operation.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 0 additions & 1 deletion metadata/src/sale_period.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
5 changes: 1 addition & 4 deletions metadata/src/show.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
};
use std::fmt::Debug;

use crate::{
availability::Availabilities, copyright::Copyrights, episode::Episodes, image::Images,
Expand Down
1 change: 0 additions & 1 deletion metadata/src/track.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};
Expand Down
1 change: 1 addition & 0 deletions playback/src/audio_backend/pipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl Sink for StdoutSink {
OpenOptions::new()
.write(true)
.create(true)
.truncate(true)
.open(file)
.map_err(|e| StdoutError::OpenFailure {
file: file.to_string(),
Expand Down

0 comments on commit a5964c2

Please sign in to comment.