Skip to content

Commit

Permalink
Use single char pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
swsnr committed Jan 10, 2025
1 parent 427c0ae commit 3bfe3c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/widgets/edit_device_dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bfe3c4

Please sign in to comment.