From 3bfe3c4f3977b5e9e8343e0a8890932902397ebf Mon Sep 17 00:00:00 2001 From: Sebastian Wiesner Date: Fri, 10 Jan 2025 22:48:57 +0100 Subject: [PATCH] Use single char pattern --- src/app/widgets/edit_device_dialog.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/widgets/edit_device_dialog.rs b/src/app/widgets/edit_device_dialog.rs index a997ec4..e3c4dd3 100644 --- a/src/app/widgets/edit_device_dialog.rs +++ b/src/app/widgets/edit_device_dialog.rs @@ -83,7 +83,7 @@ mod imp { /// Whether `s` looks as if it's a host and port, e.g. `localhost:1245`. fn is_host_and_port(s: &str) -> bool { - if let Some((_, port)) = s.rsplit_once(":") { + if let Some((_, port)) = s.rsplit_once(':') { port.chars().all(|c| c.is_ascii_digit()) } else { false