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::task::{Context, Poll};
use std::time::Duration;
use std::{io, mem, str, u32};
use std::{io, mem, str};
use async_trait::async_trait;
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, ReadBuf};

View File

@ -35,7 +35,7 @@ pub struct 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 {
info: ContactInfoRequest {
id,

View File

@ -14,7 +14,7 @@ impl<'a> Command for ContactUpdate<'a> {
}
impl<'a> ContactUpdate<'a> {
pub fn new(id: &'a str) -> ContactUpdate {
pub fn new(id: &'a str) -> Self {
Self {
contact: ContactUpdateRequest {
id,
@ -71,12 +71,6 @@ pub struct ContactChangeInfo<'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)]
#[xml(rename = "add", ns(XMLNS))]
struct AddStatuses<'a> {

View File

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