Skip to content

Commit b653568

Browse files
committed
cargo fmt.
1 parent 202325f commit b653568

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/clang.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ impl Cursor {
103103
/// lexical parents.
104104
pub fn fallible_semantic_parent(&self) -> Option<Cursor> {
105105
let sp = unsafe {
106-
Cursor { x: clang_getCursorSemanticParent(self.x) }
106+
Cursor {
107+
x: clang_getCursorSemanticParent(self.x),
108+
}
107109
};
108110
if sp == *self || !sp.is_valid() {
109111
return None;
@@ -162,7 +164,8 @@ impl Cursor {
162164
(semantic_parent.unwrap().kind() == CXCursor_Namespace ||
163165
semantic_parent.unwrap().kind() == CXCursor_NamespaceAlias ||
164166
semantic_parent.unwrap().kind() == CXCursor_NamespaceRef) {
165-
semantic_parent = semantic_parent.unwrap().fallible_semantic_parent();
167+
semantic_parent = semantic_parent.unwrap()
168+
.fallible_semantic_parent();
166169
}
167170

168171
let tu = self.translation_unit();
@@ -364,9 +367,9 @@ impl Cursor {
364367
///
365368
/// Returns None if the cursor's referent is not an enum variant.
366369
pub fn enum_val_unsigned(&self) -> Option<u64> {
367-
unsafe {
370+
unsafe {
368371
if self.kind() == CXCursor_EnumConstantDecl {
369-
Some(clang_getEnumConstantDeclUnsignedValue(self.x) as u64)
372+
Some(clang_getEnumConstantDeclUnsignedValue(self.x) as u64)
370373
} else {
371374
None
372375
}
@@ -692,11 +695,7 @@ impl Type {
692695
let rt = Type {
693696
x: unsafe { clang_getResultType(self.x) },
694697
};
695-
if rt.is_valid() {
696-
Some(rt)
697-
} else {
698-
None
699-
}
698+
if rt.is_valid() { Some(rt) } else { None }
700699
}
701700

702701
/// Given that this type is a function type, get its calling convention. If

0 commit comments

Comments
 (0)