Replace panic!() with unreachable!()
This commit is contained in:
parent
b5e21f761b
commit
ab8592526f
3 changed files with 3 additions and 3 deletions
|
@ -978,7 +978,7 @@ impl Service {
|
|||
| RoomVersionId::V9
|
||||
| RoomVersionId::V10 => RoomCreateEventContent::new_v1(conduit_user.clone()),
|
||||
RoomVersionId::V11 => RoomCreateEventContent::new_v11(),
|
||||
_ => panic!("Unexpected room version {}", room_version),
|
||||
_ => unreachable!("Validity of room version already checked"),
|
||||
};
|
||||
content.federate = true;
|
||||
content.predecessor = None;
|
||||
|
|
|
@ -178,13 +178,13 @@ impl Service {
|
|||
RoomVersionId::V8,
|
||||
RoomVersionId::V9,
|
||||
RoomVersionId::V10,
|
||||
RoomVersionId::V11,
|
||||
];
|
||||
// Experimental, partially supported room versions
|
||||
let unstable_room_versions = vec![
|
||||
RoomVersionId::V3,
|
||||
RoomVersionId::V4,
|
||||
RoomVersionId::V5,
|
||||
RoomVersionId::V11,
|
||||
];
|
||||
|
||||
let mut s = Self {
|
||||
|
|
|
@ -407,7 +407,7 @@ impl Service {
|
|||
self.redact_pdu(redact_id, pdu)?;
|
||||
}
|
||||
}
|
||||
_ => panic!("Unexpected room version {}", room_version_id)
|
||||
_ => unreachable!("Validity of room version already checked")
|
||||
};
|
||||
}
|
||||
TimelineEventType::SpaceChild => {
|
||||
|
|
Loading…
Reference in a new issue