Skip to content

Commit

Permalink
Fix static_mut_ref warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed Jan 19, 2024
1 parent c22cc7b commit 3c414b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/cargo-test-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ fn to_token_stream(code: &str) -> TokenStream {

static mut VERSION: (u32, bool) = (0, false);

fn version() -> &'static (u32, bool) {
fn version() -> (u32, bool) {
static INIT: Once = Once::new();
INIT.call_once(|| {
let output = Command::new("rustc")
Expand All @@ -201,7 +201,7 @@ fn version() -> &'static (u32, bool) {
let minor = vers.split('.').skip(1).next().unwrap().parse().unwrap();
unsafe { VERSION = (minor, is_nightly) }
});
unsafe { &VERSION }
unsafe { VERSION }
}

fn has_command(command: &str) -> bool {
Expand Down

0 comments on commit 3c414b5

Please sign in to comment.