Skip to content

Commit 3c414b5

Browse files
committed
Fix static_mut_ref warning.
1 parent c22cc7b commit 3c414b5

File tree

1 file changed

+2
-2
lines changed
  • crates/cargo-test-macro/src

1 file changed

+2
-2
lines changed

crates/cargo-test-macro/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ fn to_token_stream(code: &str) -> TokenStream {
187187

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

190-
fn version() -> &'static (u32, bool) {
190+
fn version() -> (u32, bool) {
191191
static INIT: Once = Once::new();
192192
INIT.call_once(|| {
193193
let output = Command::new("rustc")
@@ -201,7 +201,7 @@ fn version() -> &'static (u32, bool) {
201201
let minor = vers.split('.').skip(1).next().unwrap().parse().unwrap();
202202
unsafe { VERSION = (minor, is_nightly) }
203203
});
204-
unsafe { &VERSION }
204+
unsafe { VERSION }
205205
}
206206

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

0 commit comments

Comments
 (0)