silence some Rust warnings

Summary: This is causing noise when compiling, let's silence them.

Reviewed By: kulshrax

Differential Revision: D22925881

fbshipit-source-id: 10b48f1f05ff8931e23d07a9d7e9504339fceca0
This commit is contained in:
Xavier Deguillard 2020-08-05 00:15:13 -07:00 committed by Facebook GitHub Bot
parent 289e835e3d
commit 4f5455cfa5
2 changed files with 8 additions and 3 deletions

View File

@ -11,7 +11,6 @@ use anyhow::{bail, Result};
use ini::Ini;
use log::{error, info};
use std::collections::HashMap;
use std::env;
use std::fmt;
use std::path::{Path, PathBuf};
use std::process::Command;

View File

@ -247,7 +247,10 @@ pub fn is_executable(metadata: &Metadata) -> bool {
return metadata.permissions().mode() & 0o111 != 0;
#[cfg(target_os = "windows")]
panic!("is_executable is not supported on Windows");
{
let _ = metadata;
panic!("is_executable is not supported on Windows");
}
}
pub fn is_symlink(metadata: &Metadata) -> bool {
@ -255,5 +258,8 @@ pub fn is_symlink(metadata: &Metadata) -> bool {
return metadata.file_type().is_symlink();
#[cfg(target_os = "windows")]
panic!("is_symlink is not supported on Windows");
{
let _ = metadata;
panic!("is_symlink is not supported on Windows");
}
}