Skip to content

Commit c1a4ebe

Browse files
committed
removing unwrap
1 parent 2e2a6be commit c1a4ebe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/graphql.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,10 +1130,12 @@ impl FilterTypeType {
11301130
match &self.entity {
11311131
FilterableType::Scalar(s) => s.name().expect("scalar name should exist"),
11321132
FilterableType::Enum(e) => e.name().expect("enum type name should exist"),
1133-
FilterableType::List(l) => match l.of_type().unwrap().name() {
1134-
None => panic!("inner list type name should exist"),
1135-
Some(name) => format!("{}List", name)
1136-
},
1133+
FilterableType::List(l) => format!(
1134+
"{}List",
1135+
l.of_type()
1136+
.expect("inner list type should exist")
1137+
.name()
1138+
.expect("inner list type name should exist"))
11371139
}
11381140
}
11391141
}

0 commit comments

Comments
 (0)