diff options
author | Tai Sassen-Liang <tsl@rupsvak.net> | 2017-03-09 01:10:49 +0100 |
---|---|---|
committer | Tai Sassen-Liang <tsl@rupsvak.net> | 2017-03-09 01:10:49 +0100 |
commit | b826a80d2016c4b32fc23019deb3c4071af91728 (patch) | |
tree | adbeb0477e8e98a86835b2e2bc10028f9e4a9f71 /src | |
parent | 96c4eb4bf728e09db849be77e8c6b2dc78bf0b87 (diff) |
Reorder conditional; use is_none()
Diffstat (limited to 'src')
-rw-r--r-- | src/clang.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 2 |
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. @@ -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. |