Skip to content

Commit a6f7365

Browse files
committed
fix clippy warnings
1 parent 4b9f94d commit a6f7365

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

oryx-tui/src/ebpf/egress.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn load_egress(
5858
{
5959
Ok(v) => v,
6060
Err(e) => {
61-
error!("Fail to load the egress eBPF bytecode. {}", e);
61+
error!("Fail to load the egress eBPF bytecode. {e}");
6262
Notification::send(
6363
"Fail to load the egress eBPF bytecode",
6464
NotificationLevel::Error,
@@ -92,7 +92,7 @@ pub fn load_egress(
9292
bpf.program_mut("oryx").unwrap().try_into().unwrap();
9393

9494
if let Err(e) = program.load() {
95-
error!("Fail to load the egress eBPF program to the kernel. {}", e);
95+
error!("Fail to load the egress eBPF program to the kernel. {e}");
9696
Notification::send(
9797
"Fail to load the egress eBPF program to the kernel",
9898
NotificationLevel::Error,
@@ -103,10 +103,7 @@ pub fn load_egress(
103103
};
104104

105105
if let Err(e) = program.attach(&iface, TcAttachType::Egress) {
106-
error!(
107-
"Failed to attach the egress eBPF program to the interface.{}",
108-
e
109-
);
106+
error!("Failed to attach the egress eBPF program to the interface.{e}",);
110107
Notification::send(
111108
"Failed to attach the egress eBPF program to the interface",
112109
NotificationLevel::Error,

oryx-tui/src/ebpf/ingress.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub fn load_ingress(
5858
{
5959
Ok(v) => v,
6060
Err(e) => {
61-
error!("Failed to load the ingress eBPF bytecode. {}", e);
61+
error!("Failed to load the ingress eBPF bytecode. {e}");
6262
Notification::send(
6363
"Failed to load the ingress eBPF bytecode",
6464
NotificationLevel::Error,
@@ -93,10 +93,7 @@ pub fn load_ingress(
9393
bpf.program_mut("oryx").unwrap().try_into().unwrap();
9494

9595
if let Err(e) = program.load() {
96-
error!(
97-
"Failed to load the ingress eBPF program to the kernel. {}",
98-
e
99-
);
96+
error!("Failed to load the ingress eBPF program to the kernel. {e}",);
10097
Notification::send(
10198
"Failed to load the ingress eBPF program to the kernel",
10299
NotificationLevel::Error,
@@ -107,10 +104,7 @@ pub fn load_ingress(
107104
};
108105

109106
if let Err(e) = program.attach(&iface, TcAttachType::Ingress) {
110-
error!(
111-
"Failed to attach the ingress eBPF program to the interface. {}",
112-
e
113-
);
107+
error!("Failed to attach the ingress eBPF program to the interface. {e}",);
114108
Notification::send(
115109
"Failed to attach the ingress eBPF program to the interface",
116110
NotificationLevel::Error,

oryx-tui/src/section/firewall.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ impl Firewall {
308308
Ok(saved_rules) => saved_rules,
309309

310310
Err(err) => {
311-
error!("{}", err.to_string());
311+
error!("{err}");
312312
Vec::new()
313313
}
314314
};
@@ -542,7 +542,7 @@ impl Firewall {
542542
crate::notification::NotificationLevel::Error,
543543
sender.clone(),
544544
)?;
545-
error!("Error while syncing firewall rules. {}", e);
545+
error!("Error while syncing firewall rules. {e}");
546546
}
547547
},
548548

0 commit comments

Comments
 (0)