summaryrefslogtreecommitdiff
path: root/libbindgen/src/ir/function.rs
diff options
context:
space:
mode:
authorRémy HUBSCHER <rhubscher@mozilla.com>2016-11-04 17:05:23 +0100
committerRémy HUBSCHER <rhubscher@mozilla.com>2016-11-17 16:04:51 +0100
commite65cd9bf47f52c13522b984426e26b948de9dbe7 (patch)
tree7a15b8fd8602a390251653d1dfef3c682a0e6b48 /libbindgen/src/ir/function.rs
parent3761ada615983a20456370dacbbb41628c69650e (diff)
Attempt to fix #130 — clang::Cursor::args should return an Option<Vec<Cursor>>
Diffstat (limited to 'libbindgen/src/ir/function.rs')
-rw-r--r--libbindgen/src/ir/function.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbindgen/src/ir/function.rs b/libbindgen/src/ir/function.rs
index eacb6c0e..60bd1e5b 100644
--- a/libbindgen/src/ir/function.rs
+++ b/libbindgen/src/ir/function.rs
@@ -150,7 +150,7 @@ impl FunctionSig {
CXCursor_CXXMethod => {
// For CXCursor_FunctionDecl, cursor.args() is the reliable way
// to get parameter names and types.
- cursor.args()
+ cursor.args().expect("It cannot be None because we are in a method/function")
.iter()
.map(|arg| {
let arg_ty = arg.cur_type();