Reduce high volume of strings from FedDest and ActualDest in resolver.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-11-23 00:04:41 +00:00
parent 9e539d0a22
commit a748edd621
7 changed files with 59 additions and 56 deletions

View File

@@ -28,7 +28,7 @@ fn ips_keep_custom_ports() {
fn hostnames_get_default_ports() {
assert_eq!(
add_port_to_hostname("example.com"),
FedDest::Named(String::from("example.com"), ":8448".try_into().unwrap())
FedDest::Named("example.com".into(), ":8448".try_into().unwrap())
);
}
@@ -36,6 +36,6 @@ fn hostnames_get_default_ports() {
fn hostnames_keep_custom_ports() {
assert_eq!(
add_port_to_hostname("example.com:1337"),
FedDest::Named(String::from("example.com"), ":1337".try_into().unwrap())
FedDest::Named("example.com".into(), ":1337".try_into().unwrap())
);
}