Skip to content

Commit 4fa97c5

Browse files
[autofix.ci] apply automated fixes (attempt 2/3)
1 parent 92ef61e commit 4fa97c5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mitmproxy-linux/src/main2.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn load_bpf(device_index: u32) -> Result<Ebpf> {
4343
.context("failed to load eBPF program")?;
4444
if let Err(e) = aya_log::EbpfLogger::init(&mut ebpf) {
4545
// This can happen if you remove all log statements from your eBPF program.
46-
warn!("failed to initialize eBPF logger: {}", e);
46+
warn!("failed to initialize eBPF logger: {e}");
4747
}
4848

4949
debug!("Attaching BPF_CGROUP_INET_SOCK_CREATE program...");
@@ -181,7 +181,7 @@ fn bump_memlock_rlimit() {
181181
};
182182
let ret = unsafe { libc::setrlimit(libc::RLIMIT_MEMLOCK, &rlim) };
183183
if ret != 0 {
184-
info!("remove limit on locked memory failed, ret is: {}", ret);
184+
info!("remove limit on locked memory failed, ret is: {ret}");
185185
}
186186
}
187187

src/packet_sources/linux.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ async fn start_redirector(
6161
while let Ok(Some(line)) = stderr.next_line().await {
6262
if shutdown2.is_shutting_down() {
6363
// We don't want to log during exit, https://github.com/vorner/pyo3-log/issues/30
64-
eprintln!("{}", line);
64+
eprintln!("{line}");
6565
continue;
6666
}
6767

@@ -92,9 +92,9 @@ async fn start_redirector(
9292
}
9393
other => {
9494
if shutdown.is_shutting_down() {
95-
eprintln!("[linux-redirector] exited during shutdown: {:?}", other)
95+
eprintln!("[linux-redirector] exited during shutdown: {other:?}")
9696
} else {
97-
error!("[linux-redirector] exited: {:?}", other)
97+
error!("[linux-redirector] exited: {other:?}")
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)