@@ -1395,11 +1395,9 @@ pub extern "C" fn processing_input_mouse_button(surface_id: u64, button: u8, pre
13951395 PROCESSING_MOUSE_MIDDLE => MouseButton :: Middle ,
13961396 PROCESSING_MOUSE_RIGHT => MouseButton :: Right ,
13971397 _ => {
1398- return Err (
1399- ProcessingError :: InvalidArgument ( format ! (
1400- "invalid mouse button: {button}"
1401- ) ) ,
1402- ) ;
1398+ return Err ( ProcessingError :: InvalidArgument ( format ! (
1399+ "invalid mouse button: {button}"
1400+ ) ) ) ;
14031401 }
14041402 } ;
14051403 input_set_mouse_button ( Entity :: from_bits ( surface_id) , btn, pressed)
@@ -1427,9 +1425,7 @@ pub extern "C" fn processing_input_char(surface_id: u64, key_code: u32, codepoin
14271425 error:: check ( || {
14281426 let kc = key_code_from_u32 ( key_code) ?;
14291427 let ch = char:: from_u32 ( codepoint) . ok_or_else ( || {
1430- ProcessingError :: InvalidArgument ( format ! (
1431- "invalid codepoint: {codepoint}"
1432- ) )
1428+ ProcessingError :: InvalidArgument ( format ! ( "invalid codepoint: {codepoint}" ) )
14331429 } ) ?;
14341430 input_set_char ( Entity :: from_bits ( surface_id) , kc, ch)
14351431 } ) ;
@@ -1528,8 +1524,7 @@ pub extern "C" fn processing_key() -> u32 {
15281524#[ unsafe( no_mangle) ]
15291525pub extern "C" fn processing_key_code ( ) -> u32 {
15301526 error:: clear_error ( ) ;
1531- error:: check ( || input_key_code ( ) . map ( |opt| opt. map ( key_code_to_u32) . unwrap_or ( 0 ) ) )
1532- . unwrap_or ( 0 )
1527+ error:: check ( || input_key_code ( ) . map ( |opt| opt. map ( key_code_to_u32) . unwrap_or ( 0 ) ) ) . unwrap_or ( 0 )
15331528}
15341529
15351530#[ unsafe( no_mangle) ]
@@ -1657,9 +1652,9 @@ fn key_code_from_u32(val: u32) -> processing::prelude::error::Result<KeyCode> {
16571652 PROCESSING_KEY_ALT_RIGHT => Ok ( KeyCode :: AltRight ) ,
16581653 PROCESSING_KEY_SUPER_RIGHT => Ok ( KeyCode :: SuperRight ) ,
16591654 PROCESSING_KEY_CONTEXT_MENU => Ok ( KeyCode :: ContextMenu ) ,
1660- _ => Err ( ProcessingError :: InvalidArgument (
1661- format ! ( "unknown key code: {val}" ) ,
1662- ) ) ,
1655+ _ => Err ( ProcessingError :: InvalidArgument ( format ! (
1656+ "unknown key code: {val}"
1657+ ) ) ) ,
16631658 }
16641659}
16651660
0 commit comments