File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,9 @@ impl TryFrom<BackgroundEvent> for crate::model::BackgroundEvent {
3333 }
3434}
3535
36- // TODO: this can be changed to infallible From
37- impl TryFrom < crate :: model:: BackgroundEvent > for BackgroundEvent {
38- type Error = zvariant:: Error ;
39- fn try_from ( value : crate :: model:: BackgroundEvent ) -> Result < Self , Self :: Error > {
40- let event = match value {
36+ impl From < crate :: model:: BackgroundEvent > for BackgroundEvent {
37+ fn from ( value : crate :: model:: BackgroundEvent ) -> Self {
38+ match value {
4139 crate :: model:: BackgroundEvent :: HybridQrStateChanged ( state) => {
4240 let state: HybridState = state. into ( ) ;
4341 let value = Value :: new ( state)
@@ -53,8 +51,7 @@ impl TryFrom<crate::model::BackgroundEvent> for BackgroundEvent {
5351
5452 BackgroundEvent :: UsbStateChanged ( value)
5553 }
56- } ;
57- Ok ( event)
54+ }
5855 }
5956}
6057
You can’t perform that action at this time.
0 commit comments