Fixing clippy
This commit is contained in:
parent
80b8716be4
commit
03adb72aab
|
@ -188,10 +188,10 @@ const APP: () = {
|
||||||
|
|
||||||
#[task(priority = 1, resources=[network, settings, telemetry], schedule=[telemetry])]
|
#[task(priority = 1, resources=[network, settings, telemetry], schedule=[telemetry])]
|
||||||
fn telemetry(mut c: telemetry::Context) {
|
fn telemetry(mut c: telemetry::Context) {
|
||||||
let telemetry =
|
let telemetry: TelemetryBuffer =
|
||||||
c.resources.telemetry.lock(|telemetry| telemetry.clone());
|
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
|
c.resources
|
||||||
.network
|
.network
|
||||||
|
|
|
@ -276,15 +276,15 @@ const APP: () = {
|
||||||
|
|
||||||
#[task(priority = 1, resources=[network, digital_inputs, settings, telemetry], schedule=[telemetry])]
|
#[task(priority = 1, resources=[network, digital_inputs, settings, telemetry], schedule=[telemetry])]
|
||||||
fn telemetry(mut c: telemetry::Context) {
|
fn telemetry(mut c: telemetry::Context) {
|
||||||
let mut telemetry =
|
let mut telemetry: TelemetryBuffer =
|
||||||
c.resources.telemetry.lock(|telemetry| telemetry.clone());
|
c.resources.telemetry.lock(|telemetry| *telemetry);
|
||||||
|
|
||||||
telemetry.digital_inputs = [
|
telemetry.digital_inputs = [
|
||||||
c.resources.digital_inputs.0.is_high().unwrap(),
|
c.resources.digital_inputs.0.is_high().unwrap(),
|
||||||
c.resources.digital_inputs.1.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
|
c.resources
|
||||||
.network
|
.network
|
||||||
|
|
|
@ -85,7 +85,7 @@ impl NetworkManager {
|
||||||
/// # Returns
|
/// # Returns
|
||||||
/// A proxy that can be used in place of the network stack. Note the requirements of
|
/// 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.
|
/// 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 }
|
NetworkStackProxy { mutex: &self.mutex }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue