Apply suggestions from clippy/rustc

This commit is contained in:
Dirkjan Ochtman 2024-08-04 22:56:07 +02:00
parent fff391eb6b
commit 95b32d9c29
4 changed files with 4 additions and 10 deletions

View File

@ -6,7 +6,7 @@ use std::future::Future;
use std::pin::Pin; use std::pin::Pin;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use std::time::Duration; use std::time::Duration;
use std::{io, mem, str, u32}; use std::{io, mem, str};
use async_trait::async_trait; use async_trait::async_trait;
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, ReadBuf}; use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, ReadBuf};

View File

@ -35,7 +35,7 @@ pub struct ContactInfo<'a> {
} }
impl<'a> ContactInfo<'a> { impl<'a> ContactInfo<'a> {
pub fn new(id: &'a str, auth_password: &'a str) -> ContactInfo<'a> { pub fn new(id: &'a str, auth_password: &'a str) -> Self {
Self { Self {
info: ContactInfoRequest { info: ContactInfoRequest {
id, id,

View File

@ -14,7 +14,7 @@ impl<'a> Command for ContactUpdate<'a> {
} }
impl<'a> ContactUpdate<'a> { impl<'a> ContactUpdate<'a> {
pub fn new(id: &'a str) -> ContactUpdate { pub fn new(id: &'a str) -> Self {
Self { Self {
contact: ContactUpdateRequest { contact: ContactUpdateRequest {
id, id,
@ -71,12 +71,6 @@ pub struct ContactChangeInfo<'a> {
auth_info: Option<ContactAuthInfo<'a>>, auth_info: Option<ContactAuthInfo<'a>>,
} }
/// Type for list of elements of the `<status>` tag for contact update request
#[derive(Debug, ToXml)]
pub struct StatusList<'a> {
status: &'a [Status],
}
#[derive(Debug, ToXml)] #[derive(Debug, ToXml)]
#[xml(rename = "add", ns(XMLNS))] #[xml(rename = "add", ns(XMLNS))]
struct AddStatuses<'a> { struct AddStatuses<'a> {

View File

@ -52,7 +52,7 @@ impl Transaction<NameStore<'_>> for HostUpdate<'_> {}
impl<'a> NameStore<'a> { impl<'a> NameStore<'a> {
/// Create a new RGP restore report request /// Create a new RGP restore report request
pub fn new(subproduct: &'a str) -> NameStore { pub fn new(subproduct: &'a str) -> Self {
NameStore { NameStore {
subproduct: subproduct.into(), subproduct: subproduct.into(),
} }