Skip to content

Commit

Permalink
Exit early if readonly paths are empty
Browse files Browse the repository at this point in the history
Signed-off-by: chermehdi <[email protected]>
  • Loading branch information
chermehdi committed Dec 2, 2022
1 parent c21a7d0 commit 1ed2adb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/rust-integration-tests/runtimetest/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ pub fn validate_readonly_paths(spec: &Spec) {
}
};

if ro_paths.is_empty() {
return;
}

// TODO when https://github.com/rust-lang/rust/issues/86442 stabilizes,
// change manual matching of i32 to e.kind() and match statement

for path in ro_paths {
if let std::io::Result::Err(e) = test_read_access(path) {
let errno = Errno::from_i32(e.raw_os_error().unwrap());
Expand Down

0 comments on commit 1ed2adb

Please sign in to comment.