diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2023-01-27 10:43:16 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-27 10:43:16 -0500 |
| commit | f5840bdcd360ec0bac2501f333e58e25742b1537 (patch) | |
| tree | 7eb0818d2cafa0f6824e81b6ed2cfb609830971e /test_ffi/src | |
| parent | 1a1faff2f67613ed0b89e1a34e6c3fd02ca6fd83 (diff) | |
chore: upgrade to Rust 1.67 (#17548)
Co-authored-by: Bartek IwaĆczuk <biwanczuk@gmail.com>
Diffstat (limited to 'test_ffi/src')
| -rw-r--r-- | test_ffi/src/lib.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test_ffi/src/lib.rs b/test_ffi/src/lib.rs index ad15ee5ae..0ddccf4dc 100644 --- a/test_ffi/src/lib.rs +++ b/test_ffi/src/lib.rs @@ -20,7 +20,7 @@ pub extern "C" fn print_something() { #[no_mangle] pub unsafe extern "C" fn print_buffer(ptr: *const u8, len: usize) { let buf = std::slice::from_raw_parts(ptr, len); - println!("{:?}", buf); + println!("{buf:?}"); } /// # Safety @@ -36,7 +36,7 @@ pub unsafe extern "C" fn print_buffer2( ) { let buf1 = std::slice::from_raw_parts(ptr1, len1); let buf2 = std::slice::from_raw_parts(ptr2, len2); - println!("{:?} {:?}", buf1, buf2); + println!("{buf1:?} {buf2:?}"); } #[no_mangle] @@ -189,7 +189,7 @@ pub extern "C" fn call_fn_ptr_return_buffer( let func = func.unwrap(); let ptr = func(); let buf = unsafe { std::slice::from_raw_parts(ptr, 8) }; - println!("buf: {:?}", buf); + println!("buf: {buf:?}"); } static mut STORED_FUNCTION: Option<extern "C" fn()> = None; @@ -502,7 +502,7 @@ pub extern "C" fn make_rect(x: f64, y: f64, w: f64, h: f64) -> Rect { #[no_mangle] pub extern "C" fn print_rect(rect: Rect) { - println!("{:?}", rect); + println!("{rect:?}"); } #[derive(Debug)] @@ -541,5 +541,5 @@ pub unsafe extern "C" fn create_mixed( #[no_mangle] pub extern "C" fn print_mixed(mixed: Mixed) { - println!("{:?}", mixed); + println!("{mixed:?}"); } |
