mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Use current_dir instead of cargo_metadata
Co-Authored-By: lzutao <taolzu@gmail.com>
This commit is contained in:
parent
f940b04de6
commit
c86c09b19a
1 changed files with 1 additions and 2 deletions
|
@ -1,4 +1,3 @@
|
|||
use cargo_metadata::MetadataCommand;
|
||||
use lazy_static::lazy_static;
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
|
@ -7,7 +6,7 @@ lazy_static! {
|
|||
pub static ref CARGO_TARGET_DIR: PathBuf = {
|
||||
match env::var_os("CARGO_TARGET_DIR") {
|
||||
Some(v) => v.into(),
|
||||
None => MetadataCommand::new().exec().unwrap().target_directory,
|
||||
None => env::current_dir().unwrap().join("target"),
|
||||
}
|
||||
};
|
||||
pub static ref TARGET_LIB: PathBuf = {
|
||||
|
|
Loading…
Add table
Reference in a new issue