Skip to content

Commit 79eb7c5

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Replace unreachable! with match
Summary: Make more clear why this code is unreachable. Reviewed By: JakobDegen Differential Revision: D63786763 fbshipit-source-id: da313c6940c13a05d77d41ac35ad58185a7c73ac
1 parent 1b790a8 commit 79eb7c5

File tree

1 file changed

+3
-4
lines changed
  • starlark/src/values/typing

1 file changed

+3
-4
lines changed

starlark/src/values/typing/ty.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,9 @@ impl<'v> StarlarkValue<'v> for AbstractType {
4343
}
4444

4545
fn eval_type(&self) -> Option<Ty> {
46-
unreachable!(
47-
"This is unreachable, but this function is needed \
48-
so `TyStarlarkValue` could think this is a type"
49-
)
46+
// This is unreachable, but this function is needed
47+
// so `TyStarlarkValue` could think this is a type".
48+
match *self {}
5049
}
5150
}
5251

0 commit comments

Comments
 (0)