Skip to content
Snippets Groups Projects
Verified Commit 90907f73 authored by Eduardo Trujillo's avatar Eduardo Trujillo
Browse files

chore: Address clippy lints

parent 669e6b6e
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ async fn device_is_connected_to_one_of(
) -> Result<bool> {
match device_identifier.to_device(conn).await? {
Some(device) => {
let active_connections: Vec<ActiveConnectionWrapper> = stream::iter(connections)
let active_connections: Vec<ActiveConnectionWrapper<'_>> = stream::iter(connections)
.filter_map(|connection_identifier| async move {
match connection_identifier.to_active_connection(conn).await {
Ok(active_connection) => active_connection,
......
......@@ -80,7 +80,7 @@ impl<'a> ManagerWrapper<'a> {
let stream = stream::iter(active_connections);
let mut matches: Vec<ActiveConnectionWrapper> = stream
let mut matches: Vec<ActiveConnectionWrapper<'_>> = stream
.filter_map(|active_connection| async move {
let current_uuid = active_connection.get_uuid().await;
......
......@@ -55,8 +55,8 @@ impl<T> SignalStreamWrapper<T> {
}
pub async fn dispose(&self) -> anyhow::Result<()> {
let result = self.conn.remove_match(self.msg_match.token()).await?;
self.conn.remove_match(self.msg_match.token()).await?;
Ok(result)
Ok(())
}
}
......@@ -168,9 +168,9 @@ impl Trigger {
},
(Event::StateChanged { state }, Trigger::StateChanged { states }) => {
Ok(states.contains(state))
},
(Event::DaemonStarted, Trigger::DaemonStarted) => {Ok(true)},
(Event::DaemonStopping, Trigger::DaemonStopping) => {Ok(true)},
}
(Event::DaemonStarted, Trigger::DaemonStarted)
| (Event::DaemonStopping, Trigger::DaemonStopping) => Ok(true),
_ => Ok(false),
}
}
......
#![deny(
rust_2018_idioms,
nonstandard_style,
clippy::doc_markdown,
clippy::match_bool,
clippy::match_same_arms
)]
#![warn(future_incompatible)]
use collective::{
cli::{AppOpts, ConfigurableAppOpts},
config::ConfigFileFormat,
......@@ -89,8 +98,7 @@ async fn inner_main() -> anyhow::Result<()> {
let mut task_handles = vec![];
let watcher_handle = watcher::watch(&conn, stop_signal_tx.subscribe(), event_tx).await?;
let event_handler_handle =
handle_events(conn.clone(), config, event_rx).await?;
let event_handler_handle = handle_events(conn.clone(), config, event_rx).await?;
task_handles.push(watcher_handle);
task_handles.push(event_handler_handle);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment