From dab826e7f4810687d8929f38c5706b4f1e584c19 Mon Sep 17 00:00:00 2001 From: Joseph Livesey Date: Sun, 17 Sep 2023 10:55:34 -0400 Subject: [PATCH] Fix 'needless_return' clippy warning Signed-off-by: Joseph Livesey --- validator/src/permissions/state_source.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/validator/src/permissions/state_source.rs b/validator/src/permissions/state_source.rs index de670b616e..81aedb91d0 100644 --- a/validator/src/permissions/state_source.rs +++ b/validator/src/permissions/state_source.rs @@ -41,12 +41,10 @@ impl IdentitySource for IdentityView { .map(|mut entry| match entry.get_field_type() { Policy_EntryType::PERMIT_KEY => Ok(Permission::PermitKey(entry.take_key())), Policy_EntryType::DENY_KEY => Ok(Permission::DenyKey(entry.take_key())), - Policy_EntryType::ENTRY_TYPE_UNSET => { - return Err(IdentityError::ReadError(format!( - "policy {} is contains invalid type", - entry.get_key() - ))) - } + Policy_EntryType::ENTRY_TYPE_UNSET => Err(IdentityError::ReadError(format!( + "policy {} is contains invalid type", + entry.get_key() + ))), }) .collect();