From 899951742100b83743ef9f65fbb161454ef4bfa7 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Fri, 3 May 2019 02:37:02 +0200 Subject: core,cli: fix clippy warnings --- cli/main.rs | 9 +++------ cli/ops.rs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'cli') diff --git a/cli/main.rs b/cli/main.rs index 4632d15e4..c601c00b1 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -262,12 +262,9 @@ fn main() { v8_set_flags(vec!["--help".to_string()]); } - match &flags.v8_flags { - Some(v8_flags) => { - v8_set_flags(v8_flags.clone()); - } - _ => {} - }; + if let Some(ref v8_flags) = flags.v8_flags { + v8_set_flags(v8_flags.clone()); + } log::set_max_level(if flags.log_debug { LevelFilter::Debug diff --git a/cli/ops.rs b/cli/ops.rs index c49ce517c..4c644714f 100644 --- a/cli/ops.rs +++ b/cli/ops.rs @@ -468,7 +468,7 @@ fn op_compiler_config( let builder = &mut FlatBufferBuilder::new(); let (path, out) = match get_compiler_config(state, compiler_type) { Some(val) => val, - _ => ("".to_owned(), "".as_bytes().to_owned()), + _ => ("".to_owned(), vec![]), }; let data_off = builder.create_vector(&out); let msg_args = msg::CompilerConfigResArgs { -- cgit v1.2.3