Skip to content

Commit 7a9be84

Browse files
committed
Change panic! into unreachable!
We are just destructuring a Command::Spawn that we have created a few lines before.
1 parent 1be113a commit 7a9be84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/store/fs/util/entity_manager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ mod main_actor {
400400
match e {
401401
mpsc::error::TrySendError::Full(cmd) => {
402402
let entity_actor::Command::Spawn(spawn) = cmd else {
403-
panic!()
403+
unreachable!()
404404
};
405405
warn!(
406406
"Entity actor inbox is full, cannot send command to entity actor {:?}.",
@@ -412,7 +412,7 @@ mod main_actor {
412412
}
413413
mpsc::error::TrySendError::Closed(cmd) => {
414414
let entity_actor::Command::Spawn(spawn) = cmd else {
415-
panic!()
415+
unreachable!()
416416
};
417417
error!(
418418
"Entity actor inbox is closed, cannot send command to entity actor {:?}.",

0 commit comments

Comments
 (0)