mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
simple_op_store: use TryFrom<i32> instead of deprecated from_i32()
This commit is contained in:
parent
7aa7cbe5ff
commit
e908bd9a17
1 changed files with 1 additions and 1 deletions
|
@ -668,7 +668,7 @@ fn remote_ref_state_to_proto(state: RemoteRefState) -> Option<i32> {
|
|||
}
|
||||
|
||||
fn remote_ref_state_from_proto(proto_value: Option<i32>) -> Option<RemoteRefState> {
|
||||
let proto_state = proto_value.and_then(crate::protos::op_store::RemoteRefState::from_i32)?;
|
||||
let proto_state = proto_value?.try_into().ok()?;
|
||||
let state = match proto_state {
|
||||
crate::protos::op_store::RemoteRefState::New => RemoteRefState::New,
|
||||
crate::protos::op_store::RemoteRefState::Tracking => RemoteRefState::Tracking,
|
||||
|
|
Loading…
Reference in a new issue