Skip to content

Commit

Permalink
Upgrade prost
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Jan 9, 2024
1 parent fe3c224 commit adc92ae
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions libsignal-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hex = "0.4"
hkdf = "0.12"
hmac = "0.12"
phonenumber = "0.3"
prost = "0.10"
prost = "> 0.10, <= 0.12"
rand = "0.8"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.85"
Expand All @@ -38,7 +38,7 @@ tracing = { version = "0.1", features = ["log"] }
tracing-futures = "0.2"

[build-dependencies]
prost-build = "0.10"
prost-build = "> 0.10, <= 0.12"

[dev-dependencies]
anyhow = "1.0"
Expand Down
24 changes: 12 additions & 12 deletions libsignal-service/src/groups_v2/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ impl TryFrom<i32> for Role {

fn try_from(value: i32) -> Result<Self, Self::Error> {
use crate::proto::member::Role::*;
match crate::proto::member::Role::from_i32(value) {
Some(Unknown) => Ok(Role::Unknown),
Some(Default) => Ok(Role::Default),
Some(Administrator) => Ok(Role::Administrator),
None => Err(GroupDecodingError::WrongEnumValue),
match crate::proto::member::Role::try_from(value) {
Ok(Unknown) => Ok(Role::Unknown),
Ok(Default) => Ok(Role::Default),
Ok(Administrator) => Ok(Role::Administrator),
Err(_e) => Err(GroupDecodingError::WrongEnumValue),
}
}
}
Expand All @@ -169,13 +169,13 @@ impl TryFrom<i32> for AccessRequired {

fn try_from(value: i32) -> Result<Self, Self::Error> {
use crate::proto::access_control::AccessRequired::*;
match crate::proto::access_control::AccessRequired::from_i32(value) {
Some(Unknown) => Ok(AccessRequired::Unknown),
Some(Any) => Ok(AccessRequired::Any),
Some(Member) => Ok(AccessRequired::Member),
Some(Administrator) => Ok(AccessRequired::Administrator),
Some(Unsatisfiable) => Ok(AccessRequired::Unsatisfiable),
None => Err(GroupDecodingError::WrongEnumValue),
match crate::proto::access_control::AccessRequired::try_from(value) {
Ok(Unknown) => Ok(AccessRequired::Unknown),
Ok(Any) => Ok(AccessRequired::Any),
Ok(Member) => Ok(AccessRequired::Member),
Ok(Administrator) => Ok(AccessRequired::Administrator),
Ok(Unsatisfiable) => Ok(AccessRequired::Unsatisfiable),
Err(_e) => Err(GroupDecodingError::WrongEnumValue),
}
}
}
Expand Down

0 comments on commit adc92ae

Please sign in to comment.