From ff817a45daf0ca55001e97c1f97cf882dcf0709b Mon Sep 17 00:00:00 2001 From: jcamiel Date: Tue, 7 Dec 2021 14:59:27 +0100 Subject: [PATCH] Delete `extern crate` import. --- packages/hurl/build.rs | 4 ++-- packages/hurl/src/jsonpath/eval.rs | 2 +- packages/hurl/src/lib.rs | 3 --- packages/hurl/src/runner/multipart.rs | 2 -- packages/hurl/src/runner/request.rs | 3 --- packages/hurl/tests/jsonpath.rs | 1 - packages/hurl/tests/runner.rs | 2 -- packages/hurl_core/src/lib.rs | 2 -- packages/hurl_core/tests/json.rs | 2 -- packages/hurlfmt/src/main.rs | 2 -- packages/hurlfmt/tests/json.rs | 2 -- 11 files changed, 3 insertions(+), 22 deletions(-) diff --git a/packages/hurl/build.rs b/packages/hurl/build.rs index 6843e6e39..181ca2cbf 100644 --- a/packages/hurl/build.rs +++ b/packages/hurl/build.rs @@ -2,11 +2,11 @@ use cc::Build; use std::path::Path; #[cfg(windows)] -extern crate winres; +use winres::WindowsResource; #[cfg(windows)] fn set_icon() { - let mut res = winres::WindowsResource::new(); + let mut res = WindowsResource::new(); res.set_icon("../../ci/windows/logo.ico"); res.compile().unwrap(); } diff --git a/packages/hurl/src/jsonpath/eval.rs b/packages/hurl/src/jsonpath/eval.rs index 6c60284ab..3db35d246 100644 --- a/packages/hurl/src/jsonpath/eval.rs +++ b/packages/hurl/src/jsonpath/eval.rs @@ -15,9 +15,9 @@ * limitations under the License. * */ -extern crate serde_json; use super::ast::*; +use float_cmp::approx_eq; pub type JsonpathResult = Vec; diff --git a/packages/hurl/src/lib.rs b/packages/hurl/src/lib.rs index 4c361cfc2..071947402 100644 --- a/packages/hurl/src/lib.rs +++ b/packages/hurl/src/lib.rs @@ -17,9 +17,6 @@ */ #![cfg_attr(feature = "strict", deny(warnings))] -#[macro_use] -extern crate float_cmp; - pub mod cli; pub mod http; pub mod json; diff --git a/packages/hurl/src/runner/multipart.rs b/packages/hurl/src/runner/multipart.rs index 672607432..9096e904c 100644 --- a/packages/hurl/src/runner/multipart.rs +++ b/packages/hurl/src/runner/multipart.rs @@ -15,8 +15,6 @@ * limitations under the License. * */ -extern crate libxml; - use std::collections::HashMap; use std::ffi::OsStr; use std::fs::File; diff --git a/packages/hurl/src/runner/request.rs b/packages/hurl/src/runner/request.rs index 2c8fda7ba..7f753f8be 100644 --- a/packages/hurl/src/runner/request.rs +++ b/packages/hurl/src/runner/request.rs @@ -15,9 +15,6 @@ * limitations under the License. * */ -extern crate libxml; -extern crate serde_json; -extern crate url as external_url; use std::collections::HashMap; #[allow(unused)] diff --git a/packages/hurl/tests/jsonpath.rs b/packages/hurl/tests/jsonpath.rs index ca8c7476c..a7afa8ef4 100644 --- a/packages/hurl/tests/jsonpath.rs +++ b/packages/hurl/tests/jsonpath.rs @@ -15,7 +15,6 @@ * limitations under the License. * */ -extern crate hurl; use hurl::jsonpath; use serde_json::json; diff --git a/packages/hurl/tests/runner.rs b/packages/hurl/tests/runner.rs index 639b5cf09..025bf3444 100644 --- a/packages/hurl/tests/runner.rs +++ b/packages/hurl/tests/runner.rs @@ -15,8 +15,6 @@ * limitations under the License. * */ -extern crate hurl; - use hurl::cli; use hurl::http; use hurl::runner; diff --git a/packages/hurl_core/src/lib.rs b/packages/hurl_core/src/lib.rs index c830605e2..4c9f831ab 100644 --- a/packages/hurl_core/src/lib.rs +++ b/packages/hurl_core/src/lib.rs @@ -17,8 +17,6 @@ */ #![cfg_attr(feature = "strict", deny(warnings))] -extern crate float_cmp; - pub mod ast; pub mod error; pub mod format; diff --git a/packages/hurl_core/tests/json.rs b/packages/hurl_core/tests/json.rs index bcfa9925a..12d97cca8 100644 --- a/packages/hurl_core/tests/json.rs +++ b/packages/hurl_core/tests/json.rs @@ -15,8 +15,6 @@ * limitations under the License. * */ -extern crate hurl_core; - use hurl_core::ast::JsonValue; use std::fs; use std::fs::File; diff --git a/packages/hurlfmt/src/main.rs b/packages/hurlfmt/src/main.rs index a2b7f5d7d..c0d8372a8 100644 --- a/packages/hurlfmt/src/main.rs +++ b/packages/hurlfmt/src/main.rs @@ -15,8 +15,6 @@ * limitations under the License. * */ -extern crate clap; - use std::io::Write; use std::io::{self, Read}; use std::path::Path; diff --git a/packages/hurlfmt/tests/json.rs b/packages/hurlfmt/tests/json.rs index c61879767..c8274044c 100644 --- a/packages/hurlfmt/tests/json.rs +++ b/packages/hurlfmt/tests/json.rs @@ -16,8 +16,6 @@ * */ -extern crate proptest; - use std::fs; use proptest::prelude::prop::test_runner::TestRunner;