Resolve clippy warnings

This commit is contained in:
timvisee
2021-11-17 20:26:49 +01:00
parent acf6768b49
commit 1f4ec11ad1
2 changed files with 2 additions and 2 deletions

View File

@@ -72,7 +72,7 @@ impl BannedIp {
} }
// Parse expiry time, check if it has passed // Parse expiry time, check if it has passed
let expiry = match DateTime::parse_from_str(&expires, "%Y-%m-%d %H:%M:%S %z") { let expiry = match DateTime::parse_from_str(expires, "%Y-%m-%d %H:%M:%S %z") {
Ok(expiry) => expiry, Ok(expiry) => expiry,
Err(err) => { Err(err) => {
error!(target: "lazymc", "Failed to parse ban expiry '{}', assuming still banned: {}", expires, err); error!(target: "lazymc", "Failed to parse ban expiry '{}', assuming still banned: {}", expires, err);

View File

@@ -103,7 +103,7 @@ fn watch(server: &Server, path: &Path) -> bool {
// Reload banned IPs // Reload banned IPs
if reload { if reload {
info!(target: "lazymc", "Reloading list of banned IPs..."); info!(target: "lazymc", "Reloading list of banned IPs...");
match ban::load(&path) { match ban::load(path) {
Ok(ips) => server.set_banned_ips_blocking(ips), Ok(ips) => server.set_banned_ips_blocking(ips),
Err(err) => { Err(err) => {
error!(target: "lazymc", "Failed reload list of banned IPs from {}: {}", ban::FILE, err); error!(target: "lazymc", "Failed reload list of banned IPs from {}: {}", ban::FILE, err);