Skip to content

Commit a96d4fc

Browse files
committed
addressing a bunch of lints
1 parent 5f6f8e5 commit a96d4fc

File tree

12 files changed

+17
-6
lines changed

12 files changed

+17
-6
lines changed

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

+1-1
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

+1
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

+1-1
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

+1-1
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

-1
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

+1-1
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

+2
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

+1
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

+1
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

+2
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>,

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

+5
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ pub struct ObjectCommon {
512512
#[buildstructor::buildstructor]
513513
impl ObjectCommon {
514514
#[builder(entry = "domain")]
515+
#[allow(clippy::too_many_arguments)]
515516
pub fn new_domain(
516517
handle: Option<String>,
517518
remarks: Option<Remarks>,
@@ -536,6 +537,7 @@ impl ObjectCommon {
536537
}
537538

538539
#[builder(entry = "ip_network")]
540+
#[allow(clippy::too_many_arguments)]
539541
pub fn new_ip_network(
540542
handle: Option<String>,
541543
remarks: Option<Remarks>,
@@ -560,6 +562,7 @@ impl ObjectCommon {
560562
}
561563

562564
#[builder(entry = "autnum")]
565+
#[allow(clippy::too_many_arguments)]
563566
pub fn new_autnum(
564567
handle: Option<String>,
565568
remarks: Option<Remarks>,
@@ -584,6 +587,7 @@ impl ObjectCommon {
584587
}
585588

586589
#[builder(entry = "nameserver")]
590+
#[allow(clippy::too_many_arguments)]
587591
pub fn new_nameserver(
588592
handle: Option<String>,
589593
remarks: Option<Remarks>,
@@ -608,6 +612,7 @@ impl ObjectCommon {
608612
}
609613

610614
#[builder(entry = "entity")]
615+
#[allow(clippy::too_many_arguments)]
611616
pub fn new_entity(
612617
handle: Option<String>,
613618
remarks: Option<Remarks>,

icann-rdap-srv/src/storage/pg/tx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'a> PgTx<'a> {
3333
}
3434

3535
#[async_trait]
36-
impl<'a> TxHandle for PgTx<'a> {
36+
impl TxHandle for PgTx<'_> {
3737
async fn add_entity(&mut self, _entity: &Entity) -> Result<(), RdapServerError> {
3838
todo!()
3939
}

0 commit comments

Comments
 (0)