Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
hozan23 committed Oct 12, 2024
1 parent 6360d6f commit c2c4cb0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
5 changes: 2 additions & 3 deletions core/src/async_util/condvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ use crate::{async_runtime::lock::MutexGuard, util::random_16};
/// };
///
/// ```
pub struct CondVar {
inner: Mutex<Wakers>,
}
Expand Down Expand Up @@ -116,7 +115,7 @@ impl<'a, T> CondVarAwait<'a, T> {
}
}

impl<'a, T> Future for CondVarAwait<'a, T> {
impl<T> Future for CondVarAwait<'_, T> {
type Output = ();

fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
Expand Down Expand Up @@ -155,7 +154,7 @@ impl<'a, T> Future for CondVarAwait<'a, T> {
}
}

impl<'a, T> Drop for CondVarAwait<'a, T> {
impl<T> Drop for CondVarAwait<'_, T> {
fn drop(&mut self) {
if let Some(id) = self.id {
let mut inner = self.condvar.inner.lock();
Expand Down
2 changes: 1 addition & 1 deletion core/src/async_util/task_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub struct TaskHandler {
cancel_flag: Arc<CondWait>,
}

impl<'a> TaskHandler {
impl TaskHandler {
/// Creates a new task handler
fn new<T, Fut, CallbackF, CallbackFut>(
ex: Executor,
Expand Down
1 change: 0 additions & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ pub mod pubsub;
pub mod async_runtime;

#[cfg(feature = "crypto")]

/// Collects common cryptographic tools
pub mod crypto;

Expand Down
2 changes: 1 addition & 1 deletion jsonrpc/src/server/pubsub_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ type PubSubRPCMethodOutput<'a> =

/// Defines the interface for an RPC service.
pub trait PubSubRPCService: Sync + Send {
fn get_pubsub_method<'a>(&'a self, name: &'a str) -> Option<PubSubRPCMethod>;
fn get_pubsub_method(&self, name: &str) -> Option<PubSubRPCMethod>;
fn name(&self) -> String;
}
2 changes: 1 addition & 1 deletion jsonrpc/src/server/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ type RPCMethodOutput<'a> =

/// Defines the interface for an RPC service.
pub trait RPCService: Sync + Send {
fn get_method<'a>(&'a self, name: &'a str) -> Option<RPCMethod>;
fn get_method(&self, name: &str) -> Option<RPCMethod>;
fn name(&self) -> String;
}
2 changes: 1 addition & 1 deletion p2p/src/discovery/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ impl LookupService {
/// Starts a self lookup
async fn self_lookup(
&self,
random_peers: &Vec<PeerMsg>,
random_peers: &[PeerMsg],
peer_buffer: &mut Vec<PeerMsg>,
) -> Result<()> {
let mut results = FuturesUnordered::new();
Expand Down

0 comments on commit c2c4cb0

Please sign in to comment.