summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTai Sassen-Liang <tsl@rupsvak.net>2017-03-09 01:10:49 +0100
committerTai Sassen-Liang <tsl@rupsvak.net>2017-03-09 01:10:49 +0100
commitb826a80d2016c4b32fc23019deb3c4071af91728 (patch)
treeadbeb0477e8e98a86835b2e2bc10028f9e4a9f71 /src
parent96c4eb4bf728e09db849be77e8c6b2dc78bf0b87 (diff)
Reorder conditional; use is_none()
Diffstat (limited to 'src')
-rw-r--r--src/clang.rs2
-rw-r--r--src/lib.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/clang.rs b/src/clang.rs
index 6af5d2c9..fc7950dc 100644
--- a/src/clang.rs
+++ b/src/clang.rs
@@ -80,7 +80,7 @@ impl Cursor {
/// Returns whether the cursor refers to a built-in definition.
pub fn is_builtin(&self) -> bool {
let (file, _, _, _) = self.location().location();
- !file.name().is_some()
+ file.name().is_none()
}
/// Get the `Cursor` for this cursor's referent's lexical parent.
diff --git a/src/lib.rs b/src/lib.rs
index 5d4df26a..30d9987b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -826,7 +826,7 @@ impl<'ctx> Bindings<'ctx> {
/// Determines whether the given cursor is in any of the files matched by the
/// options.
fn filter_builtins(ctx: &BindgenContext, cursor: &clang::Cursor) -> bool {
- !cursor.is_builtin() || ctx.options().builtins
+ ctx.options().builtins || !cursor.is_builtin()
}
/// Parse one `Item` from the Clang cursor.