Skip to content

Commit

Permalink
fix another unsafe unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
maggie98choy committed Aug 21, 2024
1 parent 481c9d8 commit fce2172
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/sdk/src/api/firebolt/fb_capabilities.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,10 @@ impl FireboltPermission {
let mut perm_list: Vec<FireboltPermission> = Vec::new();
for permission in perm_strings {
if role_based_support {
perm_list.push(FireboltPermission::deserialize(json!(permission)).unwrap());
let perm = FireboltPermission::deserialize(json!(permission));
if let Ok(p) = perm {
perm_list.push(p);
}
if permission.ends_with("[manage]") {
let mut cap = permission.clone();

Expand Down

0 comments on commit fce2172

Please sign in to comment.