Skip to content

Commit 40d17c2

Browse files
committed
missed file
1 parent 0d765a4 commit 40d17c2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

wire/src/user.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ impl Default for Jwt {
6666

6767
#[derive(Debug, Clone, Copy, PartialEq, Serialize, Deserialize)]
6868
pub enum UserRole {
69-
Unprivileged,
7069
Moderator,
7170
Admin,
7271
Publisher,
@@ -75,7 +74,6 @@ pub enum UserRole {
7574
impl From<UserRole> for i32 {
7675
fn from(role: UserRole) -> i32 {
7776
match role {
78-
UserRole::Unprivileged => 1,
7977
UserRole::Moderator => 2,
8078
UserRole::Admin => 3,
8179
UserRole::Publisher => 4,
@@ -86,13 +84,11 @@ impl From<UserRole> for i32 {
8684
impl From<i32> for UserRole {
8785
fn from(number: i32) -> UserRole {
8886
match number {
89-
1 => UserRole::Unprivileged,
9087
2 => UserRole::Moderator,
9188
3 => UserRole::Admin,
9289
4 => UserRole::Publisher,
9390
_ => {
94-
eprintln!("Tried to convert an unsupported number into a user role");
95-
UserRole::Unprivileged
91+
panic!("Tried to convert an unsupported number into a user role");
9692
}
9793
}
9894
}

0 commit comments

Comments
 (0)