clippy: new fixes

This commit is contained in:
Valentin Tolmer
2024-06-16 11:58:00 +02:00
committed by nitnelave
parent 73686224dd
commit 6f46ffd1e4
6 changed files with 22 additions and 25 deletions

View File

@@ -445,10 +445,10 @@ impl ConfigOverrider for LdapsOpts {
config.ldaps_options.port = port;
}
if let Some(path) = self.ldaps_cert_file.as_ref() {
config.ldaps_options.cert_file = path.clone();
config.ldaps_options.cert_file.clone_from(path);
}
if let Some(path) = self.ldaps_key_file.as_ref() {
config.ldaps_options.key_file = path.clone();
config.ldaps_options.key_file.clone_from(path);
}
}
}
@@ -470,13 +470,13 @@ impl ConfigOverrider for SmtpOpts {
config.smtp_options.reply_to = Some(reply_to.clone());
}
if let Some(server) = &self.smtp_server {
config.smtp_options.server = server.clone();
config.smtp_options.server.clone_from(server);
}
if let Some(port) = self.smtp_port {
config.smtp_options.port = port;
}
if let Some(user) = &self.smtp_user {
config.smtp_options.user = user.clone();
config.smtp_options.user.clone_from(user);
}
if let Some(password) = &self.smtp_password {
config.smtp_options.password = SecUtf8::from(password.clone());

View File

@@ -29,9 +29,9 @@ impl std::fmt::Debug for DatabaseUrl {
}
}
impl ToString for DatabaseUrl {
fn to_string(&self) -> String {
self.0.to_string()
impl std::fmt::Display for DatabaseUrl {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.write_fmt(format_args!("{}", self.0))
}
}

View File

@@ -31,9 +31,6 @@ use ldap3_proto::proto::{
use std::collections::HashMap;
use tracing::{debug, instrument, warn};
#[derive(Debug, PartialEq, Eq, Clone)]
struct LdapDn(String);
#[derive(Debug)]
enum SearchScope {
Global,