Skip to content

Commit 77cf96c

Browse files
authored
Merge pull request #97 from icann/rdap_test
addressing a bunch of lints
2 parents 275af26 + a96d4fc commit 77cf96c

File tree

12 files changed

+17
-6
lines changed

12 files changed

+17
-6
lines changed

icann-rdap-client/src/gtld/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct GtldParams<'a> {
1717
pub label: String,
1818
}
1919

20-
impl<'a> GtldParams<'a> {
20+
impl GtldParams<'_> {
2121
pub fn from_parent(&mut self, parent_type: TypeId) -> Self {
2222
GtldParams {
2323
parent_type,

icann-rdap-client/src/http/reqwest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ impl Default for ReqwestClientConfig {
7777
#[buildstructor::buildstructor]
7878
impl ReqwestClientConfig {
7979
#[builder]
80+
#[allow(clippy::too_many_arguments)]
8081
pub fn new(
8182
user_agent_suffix: Option<String>,
8283
https_only: Option<bool>,

icann-rdap-client/src/md/domain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ fn do_variants(variants: &[Variant], params: MdParams) -> String {
141141
.join(", "),
142142
))
143143
});
144-
md.push_str("\n");
144+
md.push('\n');
145145
md
146146
}
147147

icann-rdap-client/src/md/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub struct MdParams<'a> {
7676
pub req_data: &'a RequestData<'a>,
7777
}
7878

79-
impl<'a> MdParams<'a> {
79+
impl MdParams<'_> {
8080
pub fn from_parent(&self, parent_type: TypeId) -> Self {
8181
MdParams {
8282
parent_type,

icann-rdap-common/src/contact/to_vcard.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ impl Contact {
2121
/// let v = contact.to_vcard();
2222
/// let json = serde_json::to_string(&v);
2323
/// ```
24-
2524
pub fn to_vcard(&self) -> Vec<Value> {
2625
// start the vcard with the version.
2726
let mut vcard: Vec<Value> = vec![json!(["version", {}, "text", "4.0"])];

icann-rdap-common/src/response/autnum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Autnum {
8282
/// .build();
8383
/// ```
8484
#[builder(entry = "basic")]
85-
85+
#[allow(clippy::too_many_arguments)]
8686
pub fn new_autnum(
8787
autnum_range: std::ops::Range<u32>,
8888
handle: Option<String>,

icann-rdap-common/src/response/domain.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ impl Domain {
186186
/// .build();
187187
/// ```
188188
#[builder(entry = "basic")]
189+
#[allow(clippy::too_many_arguments)]
189190
pub fn new_ldh<T: Into<String>>(
190191
ldh_name: T,
191192
unicode_name: Option<String>,
@@ -240,6 +241,7 @@ impl Domain {
240241
/// .build();
241242
/// ```
242243
#[builder(entry = "idn")]
244+
#[allow(clippy::too_many_arguments)]
243245
pub fn new_idn<T: Into<String>>(
244246
ldh_name: Option<String>,
245247
unicode_name: T,

icann-rdap-common/src/response/entity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ impl Entity {
130130
/// .build();
131131
/// ```
132132
#[builder(entry = "basic")]
133+
#[allow(clippy::too_many_arguments)]
133134
pub fn new_handle<T: Into<String>>(
134135
handle: T,
135136
remarks: Vec<crate::response::types::Remark>,

icann-rdap-common/src/response/nameserver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ impl Nameserver {
131131
/// .build().unwrap();
132132
/// ```
133133
#[builder(entry = "basic")]
134+
#[allow(clippy::too_many_arguments)]
134135
pub fn new_ldh<T: Into<String>>(
135136
ldh_name: T,
136137
addresses: Vec<String>,

icann-rdap-common/src/response/network.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ impl Network {
199199
/// .build().unwrap();
200200
/// ```
201201
#[builder(entry = "basic")]
202+
#[allow(clippy::too_many_arguments)]
202203
pub fn new_network(
203204
cidr: String,
204205
handle: Option<String>,
@@ -240,6 +241,7 @@ impl Network {
240241
}
241242

242243
#[builder(entry = "with_options")]
244+
#[allow(clippy::too_many_arguments)]
243245
pub fn new_network_with_options(
244246
cidr: String,
245247
handle: Option<String>,

0 commit comments

Comments
 (0)