enable string_slice lint

Also swaps out vendored HTML-escaping code for a dependency that I
imagine has decent testing considering all of its reverse depedencies.
This commit is contained in:
Charles Hall 2024-05-12 19:08:12 -07:00
parent 9abe4799db
commit 844b32f097
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
7 changed files with 35 additions and 73 deletions

View file

@ -107,7 +107,7 @@ impl FedDest {
fn port(&self) -> Option<u16> {
match &self {
Self::Literal(addr) => Some(addr.port()),
Self::Named(_, port) => port[1..].parse().ok(),
Self::Named(_, port) => port.strip_prefix(':').and_then(|x| x.parse().ok()),
}
}
}