From c3ef358c01956bfa44a7427a2548943c3f045138 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 16 Sep 2020 12:50:16 -0400 Subject: [PATCH] Remove unnecessary extern statements --- cli/global_timer.rs | 2 +- cli/main.rs | 14 -------------- cli/ops/io.rs | 3 --- cli/ops/runtime_compiler.rs | 2 +- cli/tests/integration_tests.rs | 7 +------ cli/upgrade.rs | 4 +--- 6 files changed, 4 insertions(+), 28 deletions(-) diff --git a/cli/global_timer.rs b/cli/global_timer.rs index d2d294de91..1870ebd54b 100644 --- a/cli/global_timer.rs +++ b/cli/global_timer.rs @@ -8,9 +8,9 @@ //! only need to be able to start and cancel a single timer (or Delay, as Tokio //! calls it) for an entire Isolate. This is what is implemented here. -use crate::futures::TryFutureExt; use futures::channel::oneshot; use futures::future::FutureExt; +use futures::TryFutureExt; use std::future::Future; use std::time::Instant; diff --git a/cli/main.rs b/cli/main.rs index cd32207c75..9a9ca9ee24 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -1,25 +1,11 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -extern crate dissimilar; #[macro_use] extern crate lazy_static; #[macro_use] extern crate log; -extern crate futures; #[macro_use] extern crate serde_json; -extern crate clap; -extern crate deno_core; -extern crate encoding_rs; -extern crate indexmap; -#[cfg(unix)] -extern crate nix; -extern crate rand; -extern crate regex; -extern crate reqwest; -extern crate serde; -extern crate tokio; -extern crate url; mod ast; mod checksum; diff --git a/cli/ops/io.rs b/cli/ops/io.rs index 8f8d9fc267..0992f768bd 100644 --- a/cli/ops/io.rs +++ b/cli/ops/io.rs @@ -30,9 +30,6 @@ use std::os::unix::io::FromRawFd; #[cfg(windows)] use std::os::windows::io::FromRawHandle; -#[cfg(windows)] -extern crate winapi; - lazy_static! { /// Due to portability issues on Windows handle to stdout is created from raw /// file descriptor. The caveat of that approach is fact that when this diff --git a/cli/ops/runtime_compiler.rs b/cli/ops/runtime_compiler.rs index fe1b4d9e18..708a60cfaf 100644 --- a/cli/ops/runtime_compiler.rs +++ b/cli/ops/runtime_compiler.rs @@ -1,12 +1,12 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -use crate::futures::FutureExt; use crate::tsc::runtime_bundle; use crate::tsc::runtime_compile; use crate::tsc::runtime_transpile; use deno_core::error::AnyError; use deno_core::BufVec; use deno_core::OpState; +use futures::FutureExt; use serde::Deserialize; use serde_json::Value; use std::cell::RefCell; diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs index 41e5c5d967..1b9e9ef14c 100644 --- a/cli/tests/integration_tests.rs +++ b/cli/tests/integration_tests.rs @@ -1,14 +1,9 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -#[cfg(unix)] -extern crate nix; -extern crate tempfile; - -use test_util as util; - use futures::prelude::*; use std::io::{BufRead, Write}; use std::process::Command; use tempfile::TempDir; +use test_util as util; #[test] fn std_tests() { diff --git a/cli/upgrade.rs b/cli/upgrade.rs index b9c6c22191..a5ba8d4956 100644 --- a/cli/upgrade.rs +++ b/cli/upgrade.rs @@ -6,13 +6,11 @@ //! the future it can be easily extended to provide //! the same functions as ops available in JS runtime. -extern crate semver_parser; -use crate::futures::FutureExt; use crate::http_util::fetch_once; use crate::http_util::FetchOnceResult; use crate::AnyError; use deno_core::error::custom_error; - +use futures::FutureExt; use regex::Regex; use reqwest::{redirect::Policy, Client}; use semver_parser::version::parse as semver_parse;