diff options
author | Himbeer <himbeer@disroot.org> | 2025-04-05 16:08:08 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2025-04-05 16:08:08 +0200 |
commit | be8c4796f80fd9a737f90acf6abc2c6c2094f98c (patch) | |
tree | a9d344989c996d22e207db5f967de2688c409d3e | |
parent | 11b9ccc1d169e18c09c2441238c14d76699dd3be (diff) |
Remove unused/unnecessary variables
-rw-r--r-- | src-tauri/src/main.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 5bb2103..4be2da2 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -151,11 +151,13 @@ impl Dhcpv6Status { impl From<Dhcpv6Lease> for Dhcpv6Status { fn from(lease: Dhcpv6Lease) -> Self { let validity = if lease.is_valid() { "✅" } else { "❌" }; - let localnow = Local::now(); - let ts = DateTime::<Local>::from(lease.timestamp); Self { - timestamp: format!("{} {}", validity, ts.format("%d.%m.%Y %H:%M:%S UTC%Z")), + timestamp: format!( + "{} {}", + validity, + DateTime::<Local>::from(lease.timestamp).format("%d.%m.%Y %H:%M:%S UTC%Z") + ), srvaddr: if lease.server == SocketAddr::V6(SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, 0, 0, 0)) { |