Squash some warnings

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2020-03-03 19:34:41 -05:00
parent bac1b413dc
commit 711bfeb7f9
2 changed files with 4 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
#![allow(dead_code)]
pub mod addr;
pub mod error;
pub mod flags;

View File

@@ -1,5 +1,3 @@
#![allow(dead_code)]
mod common;
extern crate libvm as vm;
@@ -89,6 +87,7 @@ struct Options {
type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
/*
fn get_reader(path: impl AsRef<Path>) -> Result<Box<dyn Read>> {
if let Some("-") = path.as_ref().to_str() {
Ok(Box::new(stdin()))
@@ -96,6 +95,7 @@ fn get_reader(path: impl AsRef<Path>) -> Result<Box<dyn Read>> {
Ok(Box::new(fs::File::open(path.as_ref())?))
}
}
*/
fn get_writer(path: impl AsRef<Path>) -> Result<Box<dyn Write>> {
if let Some("-") = path.as_ref().to_str() {