You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-29 22:01:14 +03:00
Enable the clippy::str_to_string lint
This commit is contained in:
@ -98,7 +98,7 @@ pub async fn get(
|
||||
if Utc::now() > login.created_at + Duration::minutes(30) {
|
||||
let ctx = ErrorContext::new()
|
||||
.with_code("compat_sso_login_expired")
|
||||
.with_description("This login session expired.".to_string());
|
||||
.with_description("This login session expired.".to_owned());
|
||||
|
||||
let content = templates.render_error(&ctx).await?;
|
||||
return Ok((cookie_jar, Html(content)).into_response());
|
||||
@ -163,7 +163,7 @@ pub async fn post(
|
||||
if Utc::now() > login.created_at + Duration::minutes(30) {
|
||||
let ctx = ErrorContext::new()
|
||||
.with_code("compat_sso_login_expired")
|
||||
.with_description("This login session expired.".to_string());
|
||||
.with_description("This login session expired.".to_owned());
|
||||
|
||||
let content = templates.render_error(&ctx).await?;
|
||||
return Ok((cookie_jar, Html(content)).into_response());
|
||||
|
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
#![deny(clippy::all, rustdoc::broken_intra_doc_links)]
|
||||
#![deny(clippy::all, clippy::str_to_string, rustdoc::broken_intra_doc_links)]
|
||||
#![warn(clippy::pedantic)]
|
||||
#![allow(
|
||||
clippy::unused_async // Some axum handlers need that
|
||||
@ -267,7 +267,7 @@ async fn test_router(pool: &PgPool) -> Result<Router, anyhow::Error> {
|
||||
let url_builder = UrlBuilder::new("https://example.com/".parse()?);
|
||||
|
||||
let matrix_config = MatrixConfig {
|
||||
homeserver: "example.com".to_string(),
|
||||
homeserver: "example.com".to_owned(),
|
||||
};
|
||||
|
||||
let policy_factory = PolicyFactory::load_default(serde_json::json!({})).await?;
|
||||
|
@ -117,15 +117,15 @@ pub(crate) async fn get(
|
||||
let claim_types_supported = Some(vec![ClaimType::Normal]);
|
||||
|
||||
let claims_supported = Some(vec![
|
||||
"iss".to_string(),
|
||||
"sub".to_string(),
|
||||
"aud".to_string(),
|
||||
"iat".to_string(),
|
||||
"exp".to_string(),
|
||||
"nonce".to_string(),
|
||||
"auth_time".to_string(),
|
||||
"at_hash".to_string(),
|
||||
"c_hash".to_string(),
|
||||
"iss".to_owned(),
|
||||
"sub".to_owned(),
|
||||
"aud".to_owned(),
|
||||
"iat".to_owned(),
|
||||
"exp".to_owned(),
|
||||
"nonce".to_owned(),
|
||||
"auth_time".to_owned(),
|
||||
"at_hash".to_owned(),
|
||||
"c_hash".to_owned(),
|
||||
]);
|
||||
|
||||
let claims_parameter_supported = Some(false);
|
||||
|
@ -93,7 +93,7 @@ impl IntoResponse for RouteError {
|
||||
(
|
||||
StatusCode::UNAUTHORIZED,
|
||||
Json(PolicyError::new(
|
||||
"invalid_client_metadata".to_string(),
|
||||
"invalid_client_metadata".to_owned(),
|
||||
joined,
|
||||
)),
|
||||
)
|
||||
|
Reference in New Issue
Block a user