mirror of
https://github.com/facebook/sapling.git
synced 2024-12-25 22:11:52 +03:00
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:
parent
289e835e3d
commit
4f5455cfa5
@ -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;
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user