From 91faa76c44acb863a8cf4a5237faa75ac21a8dee Mon Sep 17 00:00:00 2001 From: Emilio Cobos Álvarez Date: Tue, 15 Nov 2016 13:44:23 +0100 Subject: reformat. --- libbindgen/src/clang.rs | 2 +- libbindgen/src/ir/context.rs | 3 +-- libbindgen/src/ir/ty.rs | 4 ++-- 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 { + pub fn referenced(&self) -> Option { 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 { 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()); -- cgit v1.2.3