Skip to content

Commit b826a80

Browse files
author
Tai Sassen-Liang
committed
Reorder conditional; use is_none()
1 parent 96c4eb4 commit b826a80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/clang.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ impl Cursor {
8080
/// Returns whether the cursor refers to a built-in definition.
8181
pub fn is_builtin(&self) -> bool {
8282
let (file, _, _, _) = self.location().location();
83-
!file.name().is_some()
83+
file.name().is_none()
8484
}
8585

8686
/// Get the `Cursor` for this cursor's referent's lexical parent.

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ impl<'ctx> Bindings<'ctx> {
826826
/// Determines whether the given cursor is in any of the files matched by the
827827
/// options.
828828
fn filter_builtins(ctx: &BindgenContext, cursor: &clang::Cursor) -> bool {
829-
!cursor.is_builtin() || ctx.options().builtins
829+
ctx.options().builtins || !cursor.is_builtin()
830830
}
831831

832832
/// Parse one `Item` from the Clang cursor.

0 commit comments

Comments
 (0)