File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
crates/ubrn_bindgen/src/bindings/gen_rust
fixtures/custom-types-example/src Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -653,10 +653,9 @@ impl<'a> ComponentTemplate<'a> {
653653
654654 fn ffi_type_uniffi_result ( & self , t : Option < & FfiType > ) -> TokenStream {
655655 let runtime_ident = self . runtime_ident ( ) ;
656- if t. is_none ( ) {
657- quote ! { #runtime_ident:: UniffiResultVoid }
658- } else {
659- match t. unwrap ( ) {
656+ match t {
657+ None => quote ! { #runtime_ident:: UniffiResultVoid } ,
658+ Some ( t) => match t {
660659 FfiType :: UInt8 => quote ! { #runtime_ident:: UniffiResultUInt8 } ,
661660 FfiType :: UInt16 => quote ! { #runtime_ident:: UniffiResultUInt16 } ,
662661 FfiType :: UInt32 => quote ! { #runtime_ident:: UniffiResultUInt32 } ,
@@ -679,7 +678,7 @@ impl<'a> ComponentTemplate<'a> {
679678 self . ffi_type_uniffi_result ( Some ( t) )
680679 }
681680 _ => unreachable ! ( "Uniffi doesn't support returning {t:?} from callbacks" ) ,
682- }
681+ } ,
683682 }
684683 }
685684
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ impl From<Handle> for i64 {
4444 }
4545}
4646
47+ #[ allow( clippy:: infallible_try_from) ]
4748impl TryFrom < i64 > for Handle {
4849 type Error = std:: convert:: Infallible ;
4950
You can’t perform that action at this time.
0 commit comments