Skip to content

Commit 9677e41

Browse files
pvdrzkulp
authored andcommitted
fix clippy lints
1 parent 3842b11 commit 9677e41

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/ir/annotations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub enum FieldAccessorKind {
2525
/// documentation:
2626
///
2727
/// http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html
28-
#[derive(Default, Clone, PartialEq, Debug)]
28+
#[derive(Default, Clone, PartialEq, Eq, Debug)]
2929
pub struct Annotations {
3030
/// Whether this item is marked as opaque. Only applies to types.
3131
opaque: bool,

src/ir/function.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::io;
1919
const RUST_DERIVE_FUNPTR_LIMIT: usize = 12;
2020

2121
/// What kind of a function are we looking at?
22-
#[derive(Debug, Copy, Clone, PartialEq)]
22+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
2323
pub enum FunctionKind {
2424
/// A plain, free function.
2525
Function,

src/ir/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ impl Layout {
9393
}
9494

9595
/// When we are treating a type as opaque, it is just a blob with a `Layout`.
96-
#[derive(Clone, Debug, PartialEq)]
96+
#[derive(Clone, Debug, PartialEq, Eq)]
9797
pub struct Opaque(pub Layout);
9898

9999
impl Opaque {

tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn error_diff_mismatch(
139139
println!("+++ generated from: {:?}", header);
140140
}
141141

142-
for diff in diff::lines(&expected, &actual) {
142+
for diff in diff::lines(expected, actual) {
143143
match diff {
144144
diff::Result::Left(l) => println!("-{}", l),
145145
diff::Result::Both(l, _) => println!(" {}", l),
@@ -168,7 +168,7 @@ fn error_diff_mismatch(
168168
.output()?;
169169
}
170170

171-
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."));
171+
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."))
172172
}
173173

174174
fn compare_generated_header(

0 commit comments

Comments
 (0)