-
Notifications
You must be signed in to change notification settings - Fork 45
Run aya integration tests #69
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
Conversation
f893927
to
2a0dc4a
Compare
@alessandrod @ajwerner this is ready for review (see aya-rs/aya#641 for changes required to make this pass tests) |
f16a830
to
2a0dc4a
Compare
src/linker.rs
Outdated
@@ -313,7 +313,7 @@ impl Linker { | |||
in_type: Option<InputType>, | |||
) -> Result<(), LinkerError> { | |||
let mut data = Vec::new(); | |||
reader | |||
let _: usize = reader |
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.
do we need the type annotation here?
src/llvm/mod.rs
Outdated
@@ -220,7 +220,7 @@ pub unsafe fn optimize( | |||
} | |||
|
|||
debug!("running function passes"); | |||
LLVMInitializeFunctionPassManager(fpm); | |||
let _modified = LLVMInitializeFunctionPassManager(fpm) != 0; |
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.
what is the advantage of doing this? the compiler isn't complaining about it, we never check it, the code seems worse to read to me after the change
src/lib.rs
Outdated
@@ -1,4 +1,5 @@ | |||
#![deny(clippy::all)] | |||
#![deny(unused_results)] |
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.
Oh, this. But why? Did you run into some LLVM stuff that's supposed to be #[must_use]? If so let's annotate that instead?
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.
Nah, this doesn't really belong in this PR specifically. It's a useful lint that avoids things like partial reads and writes which report the number of bytes and folks often forget to check; see src/linker.rs
where I changed read
to read_exact
because the length read wasn't being checked -- this lint surfaced that.
I'll move this to another PR so we can discuss separately from this change.
Fixes #65.
2a0dc4a
to
3418abc
Compare
Fixes #65.