Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit d7cc688

Browse files
committed
Fix 'needless_return' clippy warning
Signed-off-by: Joseph Livesey <[email protected]>
1 parent f621f1b commit d7cc688

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

validator/src/permissions/state_source.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@ impl IdentitySource for IdentityView {
4141
.map(|mut entry| match entry.get_field_type() {
4242
Policy_EntryType::PERMIT_KEY => Ok(Permission::PermitKey(entry.take_key())),
4343
Policy_EntryType::DENY_KEY => Ok(Permission::DenyKey(entry.take_key())),
44-
Policy_EntryType::ENTRY_TYPE_UNSET => {
45-
return Err(IdentityError::ReadError(format!(
46-
"policy {} is contains invalid type",
47-
entry.get_key()
48-
)))
49-
}
44+
Policy_EntryType::ENTRY_TYPE_UNSET => Err(IdentityError::ReadError(format!(
45+
"policy {} is contains invalid type",
46+
entry.get_key()
47+
))),
5048
})
5149
.collect();
5250

0 commit comments

Comments
 (0)