Merge pull request #1270 from yubiuser/fix/clippy

Fix clippy warnings
This commit is contained in:
Roderick van Domburg 2024-05-11 12:34:05 +02:00 committed by GitHub
commit a5964c28fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 10 additions and 38 deletions

View file

@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
future::Future,
pin::Pin,
sync::atomic::{AtomicUsize, Ordering},
@ -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;

View file

@ -1,7 +1,4 @@
use std::{
convert::TryFrom,
ops::{Deref, DerefMut},
};
use std::ops::{Deref, DerefMut};
use protobuf::Message;
use thiserror::Error;

View file

@ -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};

View file

@ -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;

View file

@ -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,

View file

@ -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 {

View file

@ -1,8 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt,
ops::Deref,
};
use std::{fmt, ops::Deref};
use thiserror::Error;

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,4 +1,3 @@
use std::convert::TryFrom;
use std::fmt::Debug;
use protobuf::Message;

View file

@ -1,6 +1,5 @@
use std::{
collections::HashMap,
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,4 +1,4 @@
use std::{convert::TryFrom, fmt::Debug};
use std::fmt::Debug;
use super::operation::PlaylistOperations;

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -1,5 +1,4 @@
use std::{
convert::TryFrom,
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -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,

View file

@ -1,5 +1,4 @@
use std::{
convert::{TryFrom, TryInto},
fmt::Debug,
ops::{Deref, DerefMut},
};

View file

@ -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(),