You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Enable the clippy::str_to_string lint
This commit is contained in:
@@ -36,7 +36,7 @@ pub fn port(_gen: &mut SchemaGenerator) -> Schema {
|
||||
pub fn hostname(_gen: &mut SchemaGenerator) -> Schema {
|
||||
Schema::Object(SchemaObject {
|
||||
instance_type: Some(InstanceType::String.into()),
|
||||
format: Some("hostname".to_string()),
|
||||
format: Some("hostname".to_owned()),
|
||||
..SchemaObject::default()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ use super::ConfigurationSection;
|
||||
use crate::schema;
|
||||
|
||||
fn default_connection_string() -> String {
|
||||
"postgresql://".to_string()
|
||||
"postgresql://".to_owned()
|
||||
}
|
||||
|
||||
fn default_max_connections() -> NonZeroU32 {
|
||||
|
||||
@@ -28,7 +28,7 @@ use super::ConfigurationSection;
|
||||
fn mailbox_schema(_gen: &mut SchemaGenerator) -> Schema {
|
||||
Schema::Object(SchemaObject {
|
||||
instance_type: Some(InstanceType::String.into()),
|
||||
format: Some("email".to_string()),
|
||||
format: Some("email".to_owned()),
|
||||
..SchemaObject::default()
|
||||
})
|
||||
}
|
||||
@@ -36,7 +36,7 @@ fn mailbox_schema(_gen: &mut SchemaGenerator) -> Schema {
|
||||
fn hostname_schema(_gen: &mut SchemaGenerator) -> Schema {
|
||||
Schema::Object(SchemaObject {
|
||||
instance_type: Some(InstanceType::String.into()),
|
||||
format: Some("hostname".to_string()),
|
||||
format: Some("hostname".to_owned()),
|
||||
..SchemaObject::default()
|
||||
})
|
||||
}
|
||||
@@ -107,11 +107,11 @@ impl Default for EmailTransportConfig {
|
||||
|
||||
fn default_email() -> Mailbox {
|
||||
let address = Address::new("root", "localhost").unwrap();
|
||||
Mailbox::new(Some("Authentication Service".to_string()), address)
|
||||
Mailbox::new(Some("Authentication Service".to_owned()), address)
|
||||
}
|
||||
|
||||
fn default_sendmail_command() -> String {
|
||||
"sendmail".to_string()
|
||||
"sendmail".to_owned()
|
||||
}
|
||||
|
||||
/// Configuration related to sending emails
|
||||
|
||||
@@ -20,7 +20,7 @@ use serde_with::serde_as;
|
||||
use super::ConfigurationSection;
|
||||
|
||||
fn default_homeserver() -> String {
|
||||
"localhost:8008".to_string()
|
||||
"localhost:8008".to_owned()
|
||||
}
|
||||
|
||||
/// Configuration related to the Matrix homeserver
|
||||
@@ -74,7 +74,7 @@ mod tests {
|
||||
|
||||
let config = MatrixConfig::load_from_file("config.yaml")?;
|
||||
|
||||
assert_eq!(config.homeserver, "matrix.org".to_string());
|
||||
assert_eq!(config.homeserver, "matrix.org".to_owned());
|
||||
|
||||
Ok(())
|
||||
});
|
||||
|
||||
@@ -22,15 +22,15 @@ use serde_with::serde_as;
|
||||
use super::ConfigurationSection;
|
||||
|
||||
fn default_client_registration_endpoint() -> String {
|
||||
"client_registration/violation".to_string()
|
||||
"client_registration/violation".to_owned()
|
||||
}
|
||||
|
||||
fn default_register_endpoint() -> String {
|
||||
"register/violation".to_string()
|
||||
"register/violation".to_owned()
|
||||
}
|
||||
|
||||
fn default_authorization_grant_endpoint() -> String {
|
||||
"authorization_grant/violation".to_string()
|
||||
"authorization_grant/violation".to_owned()
|
||||
}
|
||||
|
||||
/// Application secrets
|
||||
|
||||
@@ -293,7 +293,7 @@ impl ConfigurationSection<'_> for SecretsConfig {
|
||||
Gh7BNzCeN+D6
|
||||
-----END PRIVATE KEY-----
|
||||
"#}
|
||||
.to_string(),
|
||||
.to_owned(),
|
||||
),
|
||||
};
|
||||
let ecdsa_key = KeyConfig {
|
||||
@@ -306,7 +306,7 @@ impl ConfigurationSection<'_> for SecretsConfig {
|
||||
OhBAAUVci1RpmUA+KdCL5sw9nadAEiONeiGr+28RYHZmlB9qXnjC
|
||||
-----END PRIVATE KEY-----
|
||||
"#}
|
||||
.to_string(),
|
||||
.to_owned(),
|
||||
),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user