Make clippy happy
This commit is contained in:
parent
42892e12a0
commit
c5fc82491b
|
@ -31,7 +31,6 @@
|
|||
//! ```rust
|
||||
//! use epp_client::config::CONFIG;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! // Get configuration for the relevant registry section
|
||||
//! let registry = CONFIG.registry("verisign").unwrap();
|
||||
//!
|
||||
|
@ -46,7 +45,6 @@
|
|||
//!
|
||||
//! // Get client certificate and private key
|
||||
//! let tls = registry.tls_files().unwrap();
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
use confy;
|
||||
|
|
|
@ -198,6 +198,6 @@ impl EppClient {
|
|||
|
||||
impl Drop for EppClient {
|
||||
fn drop(&mut self) {
|
||||
block_on(self.logout());
|
||||
let _ = block_on(self.logout());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ impl EppConnection {
|
|||
}
|
||||
|
||||
/// Writes to the socket
|
||||
async fn write(&mut self, buf: &Vec<u8>) -> Result<(), Box<dyn Error>> {
|
||||
async fn write(&mut self, buf: &[u8]) -> Result<(), Box<dyn Error>> {
|
||||
let wrote = self.stream.writer.write(buf).await?;
|
||||
|
||||
debug!("{}: Wrote {} bytes", self.registry, wrote);
|
||||
|
@ -139,7 +139,7 @@ impl EppConnection {
|
|||
|
||||
impl Drop for EppConnection {
|
||||
fn drop(&mut self) {
|
||||
block_on(self.close());
|
||||
let _ = block_on(self.close());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -212,7 +212,7 @@ impl Address {
|
|||
) -> Address {
|
||||
let street = street
|
||||
.iter()
|
||||
.filter_map(|s| Some(s.to_string_value()))
|
||||
.map(|s| s.to_string_value())
|
||||
.collect::<Vec<StringValue>>();
|
||||
|
||||
Address {
|
||||
|
|
|
@ -97,6 +97,12 @@ impl EppHello {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for EppHello {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, PartialEq, ElementName)]
|
||||
#[element_name(name = "login")]
|
||||
/// Type corresponding to the <login> tag in an EPP XML login request
|
||||
|
|
|
@ -63,7 +63,7 @@ impl EppContactCheck {
|
|||
pub fn new(contact_ids: Vec<&str>, client_tr_id: &str) -> EppContactCheck {
|
||||
let contact_ids = contact_ids
|
||||
.iter()
|
||||
.filter_map(|d| Some(d.to_string_value()))
|
||||
.map(|d| d.to_string_value())
|
||||
.collect::<Vec<StringValue>>();
|
||||
|
||||
let contact_check = ContactCheck {
|
||||
|
|
|
@ -124,9 +124,8 @@ impl EppContactUpdate {
|
|||
|
||||
/// Sets the data for the <fax> tag under <chg> for the contact update request
|
||||
pub fn set_fax(&mut self, fax: Phone) {
|
||||
match &mut self.data.command.contact.change_info {
|
||||
Some(ref mut info) => info.fax = Some(fax),
|
||||
_ => (),
|
||||
if let Some(info) = &mut self.data.command.contact.change_info {
|
||||
info.fax = Some(fax)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ impl EppDomainCheck {
|
|||
pub fn new(domains: Vec<&str>, client_tr_id: &str) -> EppDomainCheck {
|
||||
let domains = domains
|
||||
.iter()
|
||||
.filter_map(|d| Some(d.to_string_value()))
|
||||
.map(|d| d.to_string_value())
|
||||
.collect::<Vec<StringValue>>();
|
||||
|
||||
let domain_check = DomainCheck {
|
||||
|
|
|
@ -116,6 +116,7 @@ pub struct RgpRestoreReport {
|
|||
|
||||
impl EppDomainRgpRestoreReport {
|
||||
/// Creates a new EppObject for domain rgp restore report corresponding to the <epp> tag in EPP XML
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
name: &str,
|
||||
pre_data: &str,
|
||||
|
|
|
@ -63,7 +63,7 @@ impl EppHostCheck {
|
|||
pub fn new(hosts: Vec<&str>, client_tr_id: &str) -> EppHostCheck {
|
||||
let hosts = hosts
|
||||
.iter()
|
||||
.filter_map(|d| Some(d.to_string_value()))
|
||||
.map(|d| d.to_string_value())
|
||||
.collect::<Vec<StringValue>>();
|
||||
|
||||
let host_check = HostCheck {
|
||||
|
|
Loading…
Reference in New Issue