Skip to content

Commit 9473dfc

Browse files
committed
Replace expect with ? operator in type visitor
1 parent 1f66710 commit 9473dfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/par/types/visit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ where
9999
{
100100
match typ {
101101
Type::Name(span, name, args) => {
102-
let typ = defs.get(span, name, args).expect("Type not found");
102+
let typ = defs.get(span, name, args)?;
103103
visit(&typ)?;
104104
}
105105
Type::DualName(span, name, args) => {
106-
let typ = defs.get_dual(span, name, args).expect("Type not found");
106+
let typ = defs.get_dual(span, name, args)?;
107107
visit(&typ)?;
108108
}
109109
_ => {

0 commit comments

Comments
 (0)