diff --git a/justfile b/justfile index aa0b109..bb32fce 100644 --- a/justfile +++ b/justfile @@ -68,12 +68,6 @@ check: test clippy forbid check-minimal-versions gen git diff --no-ext-diff --quiet --exit-code cargo +nightly fmt --all -- --check -draft: push - hub pull-request -o --draft - -pr: check push - hub pull-request -o - publish: #!/usr/bin/env bash set -euxo pipefail diff --git a/src/host_port.rs b/src/host_port.rs index 5fc9274..c0fd7a0 100644 --- a/src/host_port.rs +++ b/src/host_port.rs @@ -99,7 +99,7 @@ struct Tuple(String, u16); impl From<&HostPort> for Tuple { fn from(node: &HostPort) -> Self { let host = match &node.host { - Host::Domain(domain) => domain.to_string(), + Host::Domain(domain) => domain.clone(), Host::Ipv4(ipv4) => ipv4.to_string(), Host::Ipv6(ipv6) => ipv6.to_string(), }; diff --git a/src/sort_order.rs b/src/sort_order.rs index 4dc537e..fc3c0c4 100644 --- a/src/sort_order.rs +++ b/src/sort_order.rs @@ -1,8 +1,9 @@ use crate::common::*; -#[derive(Clone, Copy, Debug, PartialEq, IntoStaticStr, EnumString)] +#[derive(Clone, Copy, Debug, Default, PartialEq, IntoStaticStr, EnumString)] #[strum(serialize_all = "kebab-case")] pub(crate) enum SortOrder { + #[default] Ascending, Descending, } @@ -12,9 +13,3 @@ impl SortOrder { self.into() } } - -impl Default for SortOrder { - fn default() -> Self { - Self::Ascending - } -}