mirror of
https://github.com/lldap/lldap.git
synced 2026-07-25 17:58:44 +00:00
meta: Fix cargo clippy failures (format strings)
This commit is contained in:
committed by
nitnelave
parent
53e62ecf5a
commit
87e9311a44
@@ -91,7 +91,7 @@ pub mod tests {
|
||||
handler
|
||||
.create_user(CreateUserRequest {
|
||||
user_id: UserId::new(name),
|
||||
email: format!("{}@bob.bob", name).into(),
|
||||
email: format!("{name}@bob.bob").into(),
|
||||
display_name: Some("display ".to_string() + name),
|
||||
attributes: vec![
|
||||
DomainAttribute {
|
||||
|
||||
@@ -164,7 +164,7 @@ impl GroupBackendHandler for SqlBackendHandler {
|
||||
.one(&self.sql_pool)
|
||||
.await?
|
||||
.map(Into::<GroupDetails>::into)
|
||||
.ok_or_else(|| DomainError::EntityNotFound(format!("{:?}", group_id)))?;
|
||||
.ok_or_else(|| DomainError::EntityNotFound(format!("{group_id:?}")))?;
|
||||
let attributes = model::GroupAttributes::find()
|
||||
.filter(model::GroupAttributesColumn::GroupId.eq(group_details.group_id))
|
||||
.order_by_asc(model::GroupAttributesColumn::AttributeName)
|
||||
@@ -252,8 +252,7 @@ impl GroupBackendHandler for SqlBackendHandler {
|
||||
.await?;
|
||||
if res.rows_affected == 0 {
|
||||
return Err(DomainError::EntityNotFound(format!(
|
||||
"No such group: '{:?}'",
|
||||
group_id
|
||||
"No such group: '{group_id:?}'"
|
||||
)));
|
||||
}
|
||||
Ok(())
|
||||
@@ -306,8 +305,7 @@ impl SqlBackendHandler {
|
||||
remove_group_attributes.push(attribute);
|
||||
} else {
|
||||
return Err(DomainError::InternalError(format!(
|
||||
"Group attribute name {} doesn't exist in the schema, yet was attempted to be removed from the database",
|
||||
attribute
|
||||
"Group attribute name {attribute} doesn't exist in the schema, yet was attempted to be removed from the database"
|
||||
)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,8 +240,7 @@ impl SqlBackendHandler {
|
||||
remove_user_attributes.push(attribute);
|
||||
} else {
|
||||
return Err(DomainError::InternalError(format!(
|
||||
"User attribute name {} doesn't exist in the schema, yet was attempted to be removed from the database",
|
||||
attribute
|
||||
"User attribute name {attribute} doesn't exist in the schema, yet was attempted to be removed from the database"
|
||||
)));
|
||||
}
|
||||
}
|
||||
@@ -384,8 +383,7 @@ impl UserBackendHandler for SqlBackendHandler {
|
||||
.await?;
|
||||
if res.rows_affected == 0 {
|
||||
return Err(DomainError::EntityNotFound(format!(
|
||||
"No such user: '{}'",
|
||||
user_id
|
||||
"No such user: '{user_id}'"
|
||||
)));
|
||||
}
|
||||
Ok(())
|
||||
@@ -408,8 +406,7 @@ impl UserBackendHandler for SqlBackendHandler {
|
||||
.await?;
|
||||
if res.rows_affected == 0 {
|
||||
return Err(DomainError::EntityNotFound(format!(
|
||||
"No such membership: '{}' -> {:?}",
|
||||
user_id, group_id
|
||||
"No such membership: '{user_id}' -> {group_id:?}"
|
||||
)));
|
||||
}
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user