Skip to content

Commit 70503fb

Browse files
committed
fix: Newer rust lint
1 parent 422c633 commit 70503fb

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

ota/src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl<W: OtaActions> UpdateProcessor<W> {
134134

135135
debug!(
136136
"Decoding TLV from tlv_holder: {:?}, current_len: {}",
137-
&self.tlv_holder, &self.current_len
137+
self.tlv_holder, self.current_len
138138
);
139139
let mut singular_source = tlv::TlvsSource::new(&self.tlv_holder[..self.current_len]);
140140

ota/src/sftpserver.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl<T: OpaqueFileHandle + InitFromSeed, W: OtaActions> SftpServer<T> for SftpOt
143143
self.file_handle = Some(handle.clone());
144144
info!(
145145
"SftpServer Open operation: path = {:?}, write_permission = {:?}, handle = {:?}",
146-
path, self.write_permission, &handle
146+
path, self.write_permission, handle
147147
);
148148
Ok(handle)
149149
} else {

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ fn enc_ipv4_config(v: Option<&StaticConfigV4>, s: &mut dyn SSHSink) -> WireResul
253253
v.is_some().enc(s)?;
254254
if let Some(v) = v {
255255
v.address.address().to_bits().enc(s)?;
256-
debug!("enc_ipv4_config: prefix = {}", &v.address.prefix_len());
256+
debug!("enc_ipv4_config: prefix = {}", v.address.prefix_len());
257257
v.address.prefix_len().enc(s)?;
258258
// to u32
259259
let gw = v.gateway.as_ref().map(|g| g.to_bits());

src/handle.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ pub fn session_subsystem(
175175
a.fail()?;
176176
} else if a.command()?.to_lowercase().as_str() == "sftp" {
177177
if let Some(ch) = ctx.session.take() {
178-
debug_assert!(ch.num() == a.channel());
178+
debug_assert_eq!(ch.num(), a.channel());
179179
#[cfg(feature = "sftp-ota")]
180180
{
181181
a.succeed()?;
@@ -232,7 +232,7 @@ pub async fn session_shell<P: PlatformServices>(
232232
platform.reset();
233233
}
234234
}
235-
debug_assert!(ch.num() == a.channel());
235+
debug_assert_eq!(ch.num(), a.channel());
236236
a.succeed()?;
237237
debug!("We got shell");
238238
platform.activate_uart();

src/serve.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ pub async fn connection_loop<P: PlatformServices>(
5252
let mut ph = ProgressHolder::new();
5353
let ev = serv.progress(&mut ph).await?;
5454

55-
trace!("{:?}", &ev);
55+
trace!("{ev:?}");
5656

5757
let mut ctx = EventContext {
5858
session: &mut session,

src/store.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ where
9797
{
9898
let c = SSHStampConfig::new(default_mac, default_uart_pins)?;
9999
save(flash, buf, &c)?;
100-
debug!("Created new config: {:?}", &c);
100+
debug!("Created new config: {c:?}");
101101

102102
Ok(c)
103103
}
@@ -157,9 +157,9 @@ where
157157
hash: config_hash(config)?,
158158
};
159159

160-
debug!("Before write_ssh, with hash: {}", &sc.hash.hex_dump());
160+
debug!("Before write_ssh, with hash: {}", sc.hash.hex_dump());
161161
let l = sshwire::write_ssh(buf, &sc)?;
162-
debug!("Saved flash (after write_ssh): {}", &buf[..l].hex_dump());
162+
debug!("Saved flash (after write_ssh): {}", buf[..l].hex_dump());
163163

164164
debug!(
165165
"CONFIG_OFFSET + FlashConfig::BUF_SIZE = {}",

0 commit comments

Comments
 (0)