Skip to content

Commit

Permalink
Resolve semicolon_if_nothing_returned clippy lint in test
Browse files Browse the repository at this point in the history
    warning: consider adding a `;` to the last statement for consistent formatting
       --> tests/ffi/lib.rs:498:5
        |
    498 |     *out_param = "2020"
        |     ^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `*out_param = "2020";`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
    note: the lint level is defined here
       --> tests/ffi/lib.rs:20:9
        |
    20  | #![deny(warnings)] // Check that expansion of `cxx::bridge` doesn't trigger warnings.
        |         ^^^^^^^^
        = note: `#[warn(clippy::semicolon_if_nothing_returned)]` implied by `#[warn(warnings)]`
  • Loading branch information
dtolnay committed Dec 17, 2024
1 parent 043817c commit b10e1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ffi/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ fn r_return_str(shared: &ffi::Shared) -> &str {

fn r_return_str_via_out_param<'a>(shared: &'a ffi::Shared, out_param: &mut &'a str) {
let _ = shared;
*out_param = "2020"
*out_param = "2020";
}

fn r_return_sliceu8(shared: &ffi::Shared) -> &[u8] {
Expand Down

0 comments on commit b10e1bc

Please sign in to comment.