Fixing clippy

This commit is contained in:
Ryan Summers 2021-05-06 16:23:41 +02:00
parent 80b8716be4
commit 03adb72aab
3 changed files with 7 additions and 7 deletions

View File

@ -188,10 +188,10 @@ const APP: () = {
#[task(priority = 1, resources=[network, settings, telemetry], schedule=[telemetry])]
fn telemetry(mut c: telemetry::Context) {
let telemetry =
c.resources.telemetry.lock(|telemetry| telemetry.clone());
let telemetry: TelemetryBuffer =
c.resources.telemetry.lock(|telemetry| *telemetry);
let gains = c.resources.settings.lock(|settings| settings.afe.clone());
let gains: [AfeGain; 2] = c.resources.settings.lock(|settings| settings.afe);
c.resources
.network

View File

@ -276,15 +276,15 @@ const APP: () = {
#[task(priority = 1, resources=[network, digital_inputs, settings, telemetry], schedule=[telemetry])]
fn telemetry(mut c: telemetry::Context) {
let mut telemetry =
c.resources.telemetry.lock(|telemetry| telemetry.clone());
let mut telemetry: TelemetryBuffer =
c.resources.telemetry.lock(|telemetry| *telemetry);
telemetry.digital_inputs = [
c.resources.digital_inputs.0.is_high().unwrap(),
c.resources.digital_inputs.1.is_high().unwrap(),
];
let gains = c.resources.settings.lock(|settings| settings.afe.clone());
let gains: [AfeGain; 2] = c.resources.settings.lock(|settings| settings.afe);
c.resources
.network

View File

@ -85,7 +85,7 @@ impl NetworkManager {
/// # Returns
/// A proxy that can be used in place of the network stack. Note the requirements of
/// concurrency listed in the description of this file for usage.
pub fn acquire_stack<'a>(&'a self) -> NetworkStackProxy<'a, NetworkStack> {
pub fn acquire_stack(&'_ self) -> NetworkStackProxy<'_, NetworkStack> {
NetworkStackProxy { mutex: &self.mutex }
}
}