Skip to content

Commit 12fbff3

Browse files
committed
chore: clippy: useless conversion of error types
They all support going to a `failure::Error`. Jira: IAM-1908
1 parent e63965c commit 12fbff3

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/db/internal/user.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn user_profile_by_uuid(
4949
.filter(schema::profiles::user_uuid.eq(user_uuid))
5050
.first::<UserProfileValue>(connection)
5151
.map_err(Error::from)
52-
.and_then(|p| UserProfile::try_from(p).map_err(Into::into))
52+
.and_then(UserProfile::try_from)
5353
.map_err(|err| PacksError::ProfileNotFound(user_uuid.to_string(), err.to_string()).into())
5454
}
5555

@@ -95,7 +95,7 @@ pub fn user_profile_by_user_id(
9595
.filter(schema::profiles::user_id.eq(user_id))
9696
.first::<UserProfileValue>(connection)
9797
.map_err(Error::from)
98-
.and_then(|p| UserProfile::try_from(p).map_err(Into::into))
98+
.and_then(UserProfile::try_from)
9999
.map_err(|err| PacksError::ProfileNotFound(user_id.to_string(), err.to_string()).into())
100100
}
101101

src/db/operations/groups.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ pub fn update_group(
133133
))?;
134134
internal::group::update_group(&host.user_uuid, &connection, group_name, group_update)
135135
.map(|_| ())
136-
.map_err(Into::into)
137136
}
138137

139138
pub fn get_group(pool: &Pool, group_name: &str) -> Result<Group, Error> {

0 commit comments

Comments
 (0)