Skip to content

Commit

Permalink
style: clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Sep 9, 2023
1 parent 2862a81 commit 77c3e8c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Empty file.
2 changes: 1 addition & 1 deletion uplink/src/base/bridge/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl Bridge {

pub fn register_action_route(&mut self, route: ActionRoute) -> Receiver<Action> {
let (actions_tx, actions_rx) = bounded(1);
self.insert_route(route, actions_tx.clone());
self.insert_route(route, actions_tx);

actions_rx
}
Expand Down
2 changes: 1 addition & 1 deletion uplink/src/collector/simulator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub fn spawn_data_simulators(device: DeviceData, tx: Sender<Payload>) {
spawn(Imu::simulate(tx.clone()));
spawn(Motor::simulate(tx.clone()));
spawn(PeripheralState::simulate(tx.clone()));
spawn(DeviceShadow::simulate(tx.clone()));
spawn(DeviceShadow::simulate(tx));
}

#[tokio::main(flavor = "current_thread")]
Expand Down
6 changes: 3 additions & 3 deletions uplink/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ impl Uplink {
if let Some(config) = self.config.logging.clone() {
let route = ActionRoute { name: "journalctl_config".to_string(), timeout: 10 };
let actions_rx = bridge.register_action_route(route);
let logger = JournalCtl::new(config.clone(), actions_rx, bridge_tx.clone());
let logger = JournalCtl::new(config, actions_rx, bridge_tx.clone());
thread::spawn(move || {
if let Err(e) = logger.start() {
error!("Logger stopped!! Error = {:?}", e);
Expand All @@ -438,7 +438,7 @@ impl Uplink {
if let Some(config) = self.config.logging.clone() {
let route = ActionRoute { name: "journalctl_config".to_string(), timeout: 10 };
let actions_rx = bridge.register_action_route(route);
let logger = Logcat::new(config.clone(), actions_rx, bridge_tx.clone());
let logger = Logcat::new(config, actions_rx, bridge_tx.clone());
thread::spawn(move || {
if let Err(e) = logger.start() {
error!("Logger stopped!! Error = {:?}", e);
Expand All @@ -462,7 +462,7 @@ impl Uplink {

if let Some(actions_rx) = bridge.register_action_routes(&self.config.script_runner) {
let script_runner =
ScriptRunner::new(self.config.script_runner.clone(), actions_rx, bridge_tx.clone());
ScriptRunner::new(self.config.script_runner.clone(), actions_rx, bridge_tx);
thread::spawn(move || {
if let Err(e) = script_runner.start() {
error!("Script runner stopped!! Error = {:?}", e);
Expand Down

0 comments on commit 77c3e8c

Please sign in to comment.