Clippy
This commit is contained in:
4 files changed
+5
-2
No files matched your search
@@ -164,7 +164,7 @@ where
|
||||
{
|
||||
move |buf: WriteContext<W>| {
|
||||
if let Some(ref val) = opt {
|
||||
ser(&*val)(buf)
|
||||
ser(val)(buf)
|
||||
} else {
|
||||
do_nothing()(buf)
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ pub use stream::{Stream, StreamOutput, StreamOutputError};
|
||||
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
impl<'a> From<std::sync::mpsc::RecvTimeoutError> for Error {
|
||||
impl From<std::sync::mpsc::RecvTimeoutError> for Error {
|
||||
fn from(k: std::sync::mpsc::RecvTimeoutError) -> Self {
|
||||
match k {
|
||||
std::sync::mpsc::RecvTimeoutError::Timeout => Error::Timeout,
|
||||
|
||||
@@ -96,6 +96,7 @@ impl BcConnection {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(clippy::significant_drop_in_scrutinee)]
|
||||
pub fn subscribe(&self, msg_num: u16) -> Result<BcSubscription> {
|
||||
let (tx, rx) = channel();
|
||||
match self.subscribers.lock().unwrap().entry(msg_num) {
|
||||
@@ -126,6 +127,7 @@ impl BcConnection {
|
||||
self.sink.lock().unwrap().is_udp()
|
||||
}
|
||||
|
||||
#[allow(clippy::significant_drop_in_scrutinee)]
|
||||
fn poll(
|
||||
context: &mut BcContext,
|
||||
connection: &BcSource,
|
||||
|
||||
@@ -288,6 +288,7 @@ impl UdpTransmit {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(clippy::significant_drop_in_scrutinee)]
|
||||
pub fn poll_write(
|
||||
&self,
|
||||
socket: &UdpSocket,
|
||||
|
||||
Reference in new issue
Block a user