mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 05:56:56 +00:00
refactor: move env/osstr imports to avoid warnings
This commit is contained in:
parent
14d53f75c9
commit
bdb1c44986
@ -1,7 +1,5 @@
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::{quote, ToTokens};
|
||||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
|
||||
pub fn fold_quote<F, I, T>(input: impl Iterator<Item = I>, f: F) -> TokenStream
|
||||
where
|
||||
@ -26,6 +24,8 @@ pub fn is_unit(v: &syn::Variant) -> bool {
|
||||
pub fn debug_with_rustfmt(input: &TokenStream) {
|
||||
use std::io::Write;
|
||||
use std::process::{Command, Stdio};
|
||||
use std::env;
|
||||
use std::ffi::OsStr;
|
||||
|
||||
let rustfmt_var = env::var_os("RUSTFMT");
|
||||
let rustfmt = match &rustfmt_var {
|
||||
|
Loading…
Reference in New Issue
Block a user