Skip to content

Commit

Permalink
fixing Clippy warning WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
valdok committed Mar 27, 2024
1 parent 81f32f0 commit 3edaee8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cosmwasm/enclaves/shared/utils/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub fn unseal_file_from_2_17(
};

let mut bytes = Vec::new();
if let Err(_) = file.read_to_end(&mut bytes) {
if file.read_to_end(&mut bytes).is_err() {
return Err(/*e*/ sgx_status_t::SGX_ERROR_UNEXPECTED);
}

Expand Down Expand Up @@ -179,8 +179,8 @@ pub fn unseal_file_from_2_17(
let raw_path = s_path.as_bytes();

let mut fname0: usize = 0;
for i in 0..raw_path.len() {
if raw_path[i] == b'/' as u8 {
for (i, ch) in raw_path.iter().enumerate() {
if *ch == b'/' as u8 {
fname0 = i + 1;
}
}
Expand Down

0 comments on commit 3edaee8

Please sign in to comment.