mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Fix static_mut_ref warning.
This commit is contained in:
parent
c22cc7bb8b
commit
3c414b5cf1
@ -187,7 +187,7 @@ fn to_token_stream(code: &str) -> TokenStream {
|
|||||||
|
|
||||||
static mut VERSION: (u32, bool) = (0, false);
|
static mut VERSION: (u32, bool) = (0, false);
|
||||||
|
|
||||||
fn version() -> &'static (u32, bool) {
|
fn version() -> (u32, bool) {
|
||||||
static INIT: Once = Once::new();
|
static INIT: Once = Once::new();
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
let output = Command::new("rustc")
|
let output = Command::new("rustc")
|
||||||
@ -201,7 +201,7 @@ fn version() -> &'static (u32, bool) {
|
|||||||
let minor = vers.split('.').skip(1).next().unwrap().parse().unwrap();
|
let minor = vers.split('.').skip(1).next().unwrap().parse().unwrap();
|
||||||
unsafe { VERSION = (minor, is_nightly) }
|
unsafe { VERSION = (minor, is_nightly) }
|
||||||
});
|
});
|
||||||
unsafe { &VERSION }
|
unsafe { VERSION }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has_command(command: &str) -> bool {
|
fn has_command(command: &str) -> bool {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user