From 8477daa8b970ae8ef042a5242aee705003b63fc1 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 17 Apr 2019 15:25:51 +0200 Subject: [PATCH] Fix clippy warnings --- cli/deno_dir.rs | 2 +- cli/flags.rs | 6 ++---- cli/ops.rs | 2 +- cli/state.rs | 2 +- cli/tokio_util.rs | 1 - cli/worker.rs | 5 ++--- core/examples/http_bench.rs | 3 ++- core/js_errors.rs | 13 +++++++------ core/modules.rs | 15 ++++++--------- 9 files changed, 22 insertions(+), 27 deletions(-) diff --git a/cli/deno_dir.rs b/cli/deno_dir.rs index 69496b70..5dc9afed 100644 --- a/cli/deno_dir.rs +++ b/cli/deno_dir.rs @@ -652,7 +652,7 @@ fn fetch_remote_source_async( filename: filename.to_string(), media_type: map_content_type( &p, - maybe_content_type.as_ref().map(|s| s.as_str()), + maybe_content_type.as_ref().map(String::as_str), ), source_code: source.as_bytes().to_owned(), maybe_output_code_filename: None, diff --git a/cli/flags.rs b/cli/flags.rs index 3fd3f91f..3aac1ecc 100644 --- a/cli/flags.rs +++ b/cli/flags.rs @@ -96,7 +96,7 @@ static ENV_VARIABLES_HELP: &str = "ENVIRONMENT VARIABLES: NO_COLOR Set to disable color"; fn create_cli_app<'a, 'b>() -> App<'a, 'b> { - let cli_app = App::new("deno") + App::new("deno") .bin_name("deno") .global_settings(&[AppSettings::ColorNever]) .settings(&[ @@ -194,9 +194,7 @@ fn create_cli_app<'a, 'b>() -> App<'a, 'b> { // AppSettings:AllowExternalSubcommand to treat it as an // entry point script SubCommand::with_name("