refactor: move env/osstr imports to avoid warnings

This commit is contained in:
Caleb Cartwright 2020-10-04 12:06:43 -05:00 committed by Caleb Cartwright
parent 14d53f75c9
commit bdb1c44986

View file

@ -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 {