Skip to content

Commit a897d2f

Browse files
authored
Fix clippy lints (#555)
1 parent 293a478 commit a897d2f

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

justfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,6 @@ check: test clippy forbid check-minimal-versions gen
6868
git diff --no-ext-diff --quiet --exit-code
6969
cargo +nightly fmt --all -- --check
7070

71-
draft: push
72-
hub pull-request -o --draft
73-
74-
pr: check push
75-
hub pull-request -o
76-
7771
publish:
7872
#!/usr/bin/env bash
7973
set -euxo pipefail

src/host_port.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct Tuple(String, u16);
9999
impl From<&HostPort> for Tuple {
100100
fn from(node: &HostPort) -> Self {
101101
let host = match &node.host {
102-
Host::Domain(domain) => domain.to_string(),
102+
Host::Domain(domain) => domain.clone(),
103103
Host::Ipv4(ipv4) => ipv4.to_string(),
104104
Host::Ipv6(ipv6) => ipv6.to_string(),
105105
};

src/sort_order.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
use crate::common::*;
22

3-
#[derive(Clone, Copy, Debug, PartialEq, IntoStaticStr, EnumString)]
3+
#[derive(Clone, Copy, Debug, Default, PartialEq, IntoStaticStr, EnumString)]
44
#[strum(serialize_all = "kebab-case")]
55
pub(crate) enum SortOrder {
6+
#[default]
67
Ascending,
78
Descending,
89
}
@@ -12,9 +13,3 @@ impl SortOrder {
1213
self.into()
1314
}
1415
}
15-
16-
impl Default for SortOrder {
17-
fn default() -> Self {
18-
Self::Ascending
19-
}
20-
}

0 commit comments

Comments
 (0)