summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ir/annotations.rs2
-rw-r--r--src/ir/function.rs2
-rw-r--r--src/ir/layout.rs2
-rw-r--r--tests/tests.rs4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/ir/annotations.rs b/src/ir/annotations.rs
index 4847333a..288c11eb 100644
--- a/src/ir/annotations.rs
+++ b/src/ir/annotations.rs
@@ -25,7 +25,7 @@ pub enum FieldAccessorKind {
/// documentation:
///
/// http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
-#[derive(Default, Clone, PartialEq, Debug)]
+#[derive(Default, Clone, PartialEq, Eq, Debug)]
pub struct Annotations {
/// Whether this item is marked as opaque. Only applies to types.
opaque: bool,
diff --git a/src/ir/function.rs b/src/ir/function.rs
index e8e2c2df..27192bcf 100644
--- a/src/ir/function.rs
+++ b/src/ir/function.rs
@@ -19,7 +19,7 @@ use std::io;
const RUST_DERIVE_FUNPTR_LIMIT: usize = 12;
/// What kind of a function are we looking at?
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum FunctionKind {
/// A plain, free function.
Function,
diff --git a/src/ir/layout.rs b/src/ir/layout.rs
index 472eae3d..6f450307 100644
--- a/src/ir/layout.rs
+++ b/src/ir/layout.rs
@@ -93,7 +93,7 @@ impl Layout {
}
/// When we are treating a type as opaque, it is just a blob with a `Layout`.
-#[derive(Clone, Debug, PartialEq)]
+#[derive(Clone, Debug, PartialEq, Eq)]
pub struct Opaque(pub Layout);
impl Opaque {
diff --git a/tests/tests.rs b/tests/tests.rs
index 71fc54be..8dcc5437 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -139,7 +139,7 @@ fn error_diff_mismatch(
println!("+++ generated from: {:?}", header);
}
- for diff in diff::lines(&expected, &actual) {
+ for diff in diff::lines(expected, actual) {
match diff {
diff::Result::Left(l) => println!("-{}", l),
diff::Result::Both(l, _) => println!(" {}", l),
@@ -168,7 +168,7 @@ fn error_diff_mismatch(
.output()?;
}
- return Err(Error::new(ErrorKind::Other, "Header and binding differ! Run with BINDGEN_OVERWRITE_EXPECTED=1 in the environment to automatically overwrite the expectation or with BINDGEN_TESTS_DIFFTOOL=meld to do this manually."));
+ Err(Error::new(ErrorKind::Other, "Header and binding differ! Run with BINDGEN_OVERWRITE_EXPECTED=1 in the environment to automatically overwrite the expectation or with BINDGEN_TESTS_DIFFTOOL=meld to do this manually."))
}
fn compare_generated_header(