Formatting & clippy
This commit is contained in:
parent
3b8bff6341
commit
706a3b4ac4
4 changed files with 11 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
|||
use std::borrow::Borrow;
|
||||
use std::collections::HashMap;
|
||||
use std::net::SocketAddr;
|
||||
use std::sync::atomic::{self, AtomicU32};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::borrow::Borrow;
|
||||
|
||||
use arc_swap::ArcSwapOption;
|
||||
use log::{debug, error, trace};
|
||||
|
@ -120,10 +120,10 @@ impl ClientConn {
|
|||
self.query_send.store(None);
|
||||
}
|
||||
|
||||
pub(crate) async fn call<'a, T, B>(
|
||||
pub(crate) async fn call<T, B>(
|
||||
self: Arc<Self>,
|
||||
rq: B,
|
||||
path: &'a str,
|
||||
path: &str,
|
||||
prio: RequestPriority,
|
||||
) -> Result<<T as Message>::Response, Error>
|
||||
where
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::borrow::Borrow;
|
||||
use std::marker::PhantomData;
|
||||
use std::sync::Arc;
|
||||
use std::borrow::Borrow;
|
||||
|
||||
use arc_swap::ArcSwapOption;
|
||||
use async_trait::async_trait;
|
||||
|
@ -95,7 +95,9 @@ where
|
|||
req: B,
|
||||
prio: RequestPriority,
|
||||
) -> Result<<M as Message>::Response, Error>
|
||||
where B: Borrow<M> {
|
||||
where
|
||||
B: Borrow<M>,
|
||||
{
|
||||
if *target == self.netapp.id {
|
||||
match self.handler.load_full() {
|
||||
None => Err(Error::NoHandler),
|
||||
|
|
|
@ -19,8 +19,8 @@ pub mod util;
|
|||
pub mod endpoint;
|
||||
pub mod proto;
|
||||
|
||||
mod proto2;
|
||||
mod client;
|
||||
mod proto2;
|
||||
mod server;
|
||||
|
||||
pub mod netapp;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::proto::*;
|
||||
use crate::error::*;
|
||||
use crate::proto::*;
|
||||
|
||||
pub(crate) struct QueryMessage<'a> {
|
||||
pub(crate) prio: RequestPriority,
|
||||
|
@ -58,7 +58,7 @@ impl<'a> QueryMessage<'a> {
|
|||
|
||||
let path = &bytes[2..2 + path_length];
|
||||
let telemetry_id = if telemetry_id_len > 0 {
|
||||
Some(bytes[3 + path_length .. 3 + path_length + telemetry_id_len].to_vec())
|
||||
Some(bytes[3 + path_length..3 + path_length + telemetry_id_len].to_vec())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue