Skip to content

Commit 664786a

Browse files
author
Aurélien Normand
committed
Fix rust-lang#121: call unwrap() directly instead of calling except()
1 parent 40da211 commit 664786a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/clang.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,7 @@ impl Cursor {
197197
/// Is the referent a fully specialized template specialization without any
198198
/// remaining free template arguments?
199199
pub fn is_fully_specialized_template(&self) -> bool {
200-
self.is_template() && self.num_template_args()
201-
.expect("Not a class template specialization") > 0
200+
self.is_template() && self.num_template_args().unwrap() > 0
202201
}
203202

204203
/// Is the referent a template specialization that still has remaining free

0 commit comments

Comments
 (0)