scratch: silence warnings

Summary: The compiler was complaining about these on Windows.

Reviewed By: quark-zju

Differential Revision: D20250719

fbshipit-source-id: 89405e155875a4a549b243e93ce63cf3f53b1fab
This commit is contained in:
Xavier Deguillard 2020-03-05 09:32:54 -08:00 committed by Facebook Github Bot
parent 34bce8690f
commit ef70d9eb08

View File

@ -13,7 +13,9 @@
//! may want to use watchman to watch a portion of the scratch space
//! and can arrange the directory structure to prevent over-watching.
use anyhow::{bail, ensure, format_err, Result};
#[cfg(unix)]
use anyhow::ensure;
use anyhow::{bail, format_err, Result};
use clap::{App, AppSettings, Arg, SubCommand};
use serde::Deserialize;
use std::collections::HashMap;
@ -80,7 +82,7 @@ fn lookup_home_dir_for_user(user: &str) -> Result<String> {
/// This is technically wrong for windows, but is at least
/// wrong in a backwards compatible way
#[cfg(windows)]
fn lookup_home_dir_for_user(user: &str) -> Result<String> {
fn lookup_home_dir_for_user(_user: &str) -> Result<String> {
Ok(home_dir())
}