Skip to content

Commit 3e0094e

Browse files
AlexTMjugadoremilio
authored andcommitted
Derive Debug and eq. comparison traits for InvalidRustTarget enum
These traits are useful to get expressions like `RustTarget::stable(82, 0).unwrap()` to build, as `unwrap()` requires such a `Result` to implement `Debug`. The equality comparison traits may also be useful in cases where pattern matching the enum variants through e.g. `matches!` or match expressions is deemed less stylish.
1 parent 1cd618e commit 3e0094e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bindgen/features.rs

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ enum Version {
6767
Nightly,
6868
}
6969

70+
#[derive(Debug, PartialEq, Eq, Hash)]
7071
pub enum InvalidRustTarget {
7172
TooEarly,
7273
}

0 commit comments

Comments
 (0)