summaryrefslogtreecommitdiff
path: root/libbindgen
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-15 13:44:23 +0100
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-11-16 00:46:46 +0100
commit91faa76c44acb863a8cf4a5237faa75ac21a8dee (patch)
tree164c7f107dc7e0f210cf04b8f87e2f391725a4eb /libbindgen
parentd51616852ff57afcfb9ffbc4d6947b4627c03488 (diff)
reformat.
Diffstat (limited to 'libbindgen')
-rw-r--r--libbindgen/src/clang.rs2
-rw-r--r--libbindgen/src/ir/context.rs3
-rw-r--r--libbindgen/src/ir/ty.rs4
3 files changed, 4 insertions, 5 deletions
diff --git a/libbindgen/src/clang.rs b/libbindgen/src/clang.rs
index fb495929..32424d40 100644
--- a/libbindgen/src/clang.rs
+++ b/libbindgen/src/clang.rs
@@ -264,7 +264,7 @@ impl Cursor {
/// Given that this cursor's referent is reference type, get the cursor
/// pointing to the referenced type.
- pub fn referenced(&self) -> Option<Cursor> {
+ pub fn referenced(&self) -> Option<Cursor> {
unsafe {
let ret = Cursor {
x: clang_getCursorReferenced(self.x),
diff --git a/libbindgen/src/ir/context.rs b/libbindgen/src/ir/context.rs
index 85721978..a1ec8c70 100644
--- a/libbindgen/src/ir/context.rs
+++ b/libbindgen/src/ir/context.rs
@@ -609,8 +609,7 @@ impl<'ctx> BindgenContext<'ctx> {
-> Option<ItemId> {
use clangll::{CXCursor_ClassTemplate,
CXCursor_ClassTemplatePartialSpecialization,
- CXCursor_TypeAliasTemplateDecl,
- CXCursor_TypeRef};
+ CXCursor_TypeAliasTemplateDecl, CXCursor_TypeRef};
debug!("builtin_or_resolved_ty: {:?}, {:?}, {:?}",
ty,
location,
diff --git a/libbindgen/src/ir/ty.rs b/libbindgen/src/ir/ty.rs
index 34af2db5..254568bf 100644
--- a/libbindgen/src/ir/ty.rs
+++ b/libbindgen/src/ir/ty.rs
@@ -667,7 +667,7 @@ impl Type {
TypeKind::TemplateAlias(inner.unwrap(), args)
}
CXCursor_TemplateRef => {
- let referenced = location.referenced().expect("expected value, got none");
+ let referenced = location.referenced().unwrap();
let referenced_ty = referenced.cur_type();
let referenced_declaration =
Some(referenced_ty.declaration());
@@ -679,7 +679,7 @@ impl Type {
ctx);
}
CXCursor_TypeRef => {
- let referenced = location.referenced().expect("expected value, got none");
+ let referenced = location.referenced().unwrap();
let referenced_ty = referenced.cur_type();
let referenced_declaration =
Some(referenced_ty.declaration());