-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes to tests to make cargo clippy succeed #132
Conversation
Signed-off-by: Ismo Puustinen <[email protected]>
Signed-off-by: Ismo Puustinen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this!
@@ -219,12 +219,9 @@ mod noptests { | |||
fn test_nop_kill_sigkill() -> Result<(), Error> { | |||
let nop = Arc::new(Nop::new("".to_string(), None)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, you don't need this Arc
either.
Same for all the other ones in the PR (inc. the wasi
one).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think you are right. Removed the Arc wrapping from tests now.
@@ -372,6 +371,8 @@ mod wasitest { | |||
let output = read_to_string(dir.path().join("stdout"))?; | |||
assert_eq!(output, "hello world\n"); | |||
|
|||
wasi.delete()?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to have as part of trait Drop
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure! It would look nicer but we would lose the error handling if delete()
fails. Also it would be a breaking change in the API. I would maybe not add that change into this PR but think about it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Happy to merge this once comments are resolved.
Signed-off-by: Ismo Puustinen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Add
delete()
to Wasmtime tests. Also clean up the code a little to makecargo clippy
succeed.