[librsvg/librsvg-2.52: 9/21] Remove the last uses of "extern crate"




commit 4c5a8f3cc2a91aa20c4e9933ff87b0dc00a640fd
Author: Federico Mena Quintero <federico gnome org>
Date:   Tue Mar 8 11:22:39 2022 -0600

    Remove the last uses of "extern crate"
    
    Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/673>

 benches/path_parser.rs            | 4 +---
 src/bin/rsvg-convert.rs           | 3 +--
 src/href.rs                       | 3 +--
 src/parsers.rs                    | 2 +-
 tests/src/cmdline/rsvg_convert.rs | 5 -----
 tests/src/main.rs                 | 4 ----
 tests/src/predicates/mod.rs       | 2 --
 tests/src/predicates/pdf.rs       | 1 +
 tests/src/predicates/png.rs       | 3 +--
 tests/src/predicates/svg.rs       | 1 +
 tests/src/text.rs                 | 1 +
 11 files changed, 8 insertions(+), 21 deletions(-)
---
diff --git a/benches/path_parser.rs b/benches/path_parser.rs
index 510f44a1c..fe9602d5c 100644
--- a/benches/path_parser.rs
+++ b/benches/path_parser.rs
@@ -1,6 +1,4 @@
-#[macro_use]
-extern crate criterion;
-use criterion::{black_box, Criterion};
+use criterion::{black_box, criterion_group, criterion_main, Criterion};
 
 use librsvg::bench_only::Lexer;
 use librsvg::bench_only::PathBuilder;
diff --git a/src/bin/rsvg-convert.rs b/src/bin/rsvg-convert.rs
index 30c218742..ced1072d6 100644
--- a/src/bin/rsvg-convert.rs
+++ b/src/bin/rsvg-convert.rs
@@ -1,5 +1,4 @@
-#[macro_use]
-extern crate clap;
+use clap::{arg_enum, crate_version, value_t};
 
 use gio::prelude::*;
 use gio::{Cancellable, FileCreateFlags, InputStream, OutputStream};
diff --git a/src/href.rs b/src/href.rs
index fa41ed54b..cb6892ec9 100644
--- a/src/href.rs
+++ b/src/href.rs
@@ -16,8 +16,7 @@ use markup5ever::{expanded_name, local_name, namespace_url, ns, ExpandedName};
 /// Use with an `if` pattern inside a `match`:
 ///
 /// ```
-/// # #[macro_use] extern crate markup5ever;
-/// # use markup5ever::{QualName, Prefix, Namespace, LocalName, ExpandedName};
+/// # use markup5ever::{expanded_name, local_name, namespace_url, ns, QualName, Prefix, Namespace, 
LocalName, ExpandedName};
 /// # use librsvg::doctest_only::{is_href,set_href};
 ///
 /// let qual_name = QualName::new(
diff --git a/src/parsers.rs b/src/parsers.rs
index 98fd1e2b1..e227b8712 100644
--- a/src/parsers.rs
+++ b/src/parsers.rs
@@ -189,8 +189,8 @@ impl<const REQUIRED: usize, const MAX: usize> Parse for NumberList<REQUIRED, MAX
 /// # Example
 ///
 /// ```
-/// # #[macro_use] extern crate librsvg;
 /// # use cssparser::{ParserInput, Parser};
+/// # use librsvg::parse_identifiers;
 /// # fn main() -> Result<(), cssparser::BasicParseError<'static>> {
 /// # let mut input = ParserInput::new("true");
 /// # let mut parser = Parser::new(&mut input);
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 3e62140d5..ed79f7efd 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -1,8 +1,3 @@
-extern crate assert_cmd;
-extern crate chrono;
-extern crate predicates;
-extern crate tempfile;
-
 use crate::predicates::ends_with_pkg_version;
 use crate::predicates::file;
 
diff --git a/tests/src/main.rs b/tests/src/main.rs
index 1f34ded4c..d03d8751a 100644
--- a/tests/src/main.rs
+++ b/tests/src/main.rs
@@ -1,7 +1,3 @@
-#[cfg(test)]
-#[macro_use]
-extern crate float_cmp;
-
 #[cfg(test)]
 mod api;
 
diff --git a/tests/src/predicates/mod.rs b/tests/src/predicates/mod.rs
index 81716b29a..e14061f09 100644
--- a/tests/src/predicates/mod.rs
+++ b/tests/src/predicates/mod.rs
@@ -1,5 +1,3 @@
-extern crate predicates;
-
 pub mod file;
 mod pdf;
 mod png;
diff --git a/tests/src/predicates/pdf.rs b/tests/src/predicates/pdf.rs
index 3398e623e..862e64bb8 100644
--- a/tests/src/predicates/pdf.rs
+++ b/tests/src/predicates/pdf.rs
@@ -1,4 +1,5 @@
 use chrono::{DateTime, Utc};
+use float_cmp::approx_eq;
 use lopdf::{self, Dictionary, Object};
 use predicates::prelude::*;
 use predicates::reflection::{Case, Child, PredicateReflection, Product};
diff --git a/tests/src/predicates/png.rs b/tests/src/predicates/png.rs
index 36ab93562..c3cca96fb 100644
--- a/tests/src/predicates/png.rs
+++ b/tests/src/predicates/png.rs
@@ -1,5 +1,4 @@
-extern crate png;
-
+use png;
 use predicates::prelude::*;
 use predicates::reflection::{Case, Child, PredicateReflection, Product};
 use std::fmt;
diff --git a/tests/src/predicates/svg.rs b/tests/src/predicates/svg.rs
index f4499e788..a09b98565 100644
--- a/tests/src/predicates/svg.rs
+++ b/tests/src/predicates/svg.rs
@@ -1,3 +1,4 @@
+use float_cmp::approx_eq;
 use gio::MemoryInputStream;
 use glib::Bytes;
 use predicates::prelude::*;
diff --git a/tests/src/text.rs b/tests/src/text.rs
index 8e0ace8f8..a73c32de9 100644
--- a/tests/src/text.rs
+++ b/tests/src/text.rs
@@ -1,4 +1,5 @@
 use cairo;
+use float_cmp::approx_eq;
 use librsvg::{CairoRenderer, Loader};
 use test_generator::test_resources;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]