From 124821ea0355075e465af6355712fc3a105c4f30 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 21 Mar 2024 12:02:25 +0100 Subject: [PATCH] Remove more unnecessary imports (#521) --- html5ever/examples/noop-tokenize.rs | 1 - html5ever/examples/noop-tree-builder.rs | 1 - html5ever/examples/print-tree-actions.rs | 1 - html5ever/examples/tokenize.rs | 1 - html5ever/src/serialize/mod.rs | 1 - html5ever/src/tree_builder/mod.rs | 1 - rcdom/examples/hello_xml.rs | 2 -- rcdom/examples/html2html.rs | 1 - rcdom/examples/print-rcdom.rs | 1 - rcdom/examples/xml_tree_printer.rs | 2 -- rcdom/lib.rs | 1 - rcdom/tests/html-tokenizer.rs | 1 - rcdom/tests/html-tree-builder.rs | 1 - 13 files changed, 15 deletions(-) diff --git a/html5ever/examples/noop-tokenize.rs b/html5ever/examples/noop-tokenize.rs index d6c62f1d..4aa94497 100644 --- a/html5ever/examples/noop-tokenize.rs +++ b/html5ever/examples/noop-tokenize.rs @@ -11,7 +11,6 @@ extern crate html5ever; -use std::default::Default; use std::io; use html5ever::tendril::*; diff --git a/html5ever/examples/noop-tree-builder.rs b/html5ever/examples/noop-tree-builder.rs index 07754498..27f4fa3c 100644 --- a/html5ever/examples/noop-tree-builder.rs +++ b/html5ever/examples/noop-tree-builder.rs @@ -12,7 +12,6 @@ extern crate html5ever; use std::borrow::Cow; use std::collections::HashMap; -use std::default::Default; use std::io; use html5ever::parse_document; diff --git a/html5ever/examples/print-tree-actions.rs b/html5ever/examples/print-tree-actions.rs index 7ac2de17..b95368df 100644 --- a/html5ever/examples/print-tree-actions.rs +++ b/html5ever/examples/print-tree-actions.rs @@ -12,7 +12,6 @@ extern crate html5ever; use std::borrow::Cow; use std::collections::HashMap; -use std::default::Default; use std::io; use html5ever::parse_document; diff --git a/html5ever/examples/tokenize.rs b/html5ever/examples/tokenize.rs index 039ffb79..ae1f6203 100644 --- a/html5ever/examples/tokenize.rs +++ b/html5ever/examples/tokenize.rs @@ -9,7 +9,6 @@ extern crate html5ever; -use std::default::Default; use std::io; use html5ever::tendril::*; diff --git a/html5ever/src/serialize/mod.rs b/html5ever/src/serialize/mod.rs index 8c0a65c3..d95cb452 100644 --- a/html5ever/src/serialize/mod.rs +++ b/html5ever/src/serialize/mod.rs @@ -10,7 +10,6 @@ use log::warn; pub use markup5ever::serialize::{AttrRef, Serialize, Serializer, TraversalScope}; use markup5ever::{local_name, namespace_url, ns}; -use std::default::Default; use std::io::{self, Write}; use crate::{LocalName, QualName}; diff --git a/html5ever/src/tree_builder/mod.rs b/html5ever/src/tree_builder/mod.rs index 458e274b..6929bd68 100644 --- a/html5ever/src/tree_builder/mod.rs +++ b/html5ever/src/tree_builder/mod.rs @@ -26,7 +26,6 @@ use crate::tokenizer::{Doctype, EndTag, StartTag, Tag, TokenSink, TokenSinkResul use std::borrow::Cow::Borrowed; use std::collections::VecDeque; -use std::default::Default; use std::iter::{Enumerate, Rev}; use std::mem::replace; use std::{fmt, slice}; diff --git a/rcdom/examples/hello_xml.rs b/rcdom/examples/hello_xml.rs index 6387a0af..396c199c 100644 --- a/rcdom/examples/hello_xml.rs +++ b/rcdom/examples/hello_xml.rs @@ -11,8 +11,6 @@ extern crate markup5ever_rcdom as rcdom; extern crate xml5ever; -use std::default::Default; - use rcdom::{NodeData, RcDom}; use xml5ever::driver::parse_document; use xml5ever::tendril::TendrilSink; diff --git a/rcdom/examples/html2html.rs b/rcdom/examples/html2html.rs index 353c5f59..634b2dfa 100644 --- a/rcdom/examples/html2html.rs +++ b/rcdom/examples/html2html.rs @@ -18,7 +18,6 @@ extern crate html5ever; extern crate markup5ever_rcdom as rcdom; -use std::default::Default; use std::io::{self, Write}; use html5ever::driver::ParseOpts; diff --git a/rcdom/examples/print-rcdom.rs b/rcdom/examples/print-rcdom.rs index c96f5c06..c55d2348 100644 --- a/rcdom/examples/print-rcdom.rs +++ b/rcdom/examples/print-rcdom.rs @@ -11,7 +11,6 @@ extern crate html5ever; extern crate markup5ever_rcdom as rcdom; -use std::default::Default; use std::io; use html5ever::parse_document; diff --git a/rcdom/examples/xml_tree_printer.rs b/rcdom/examples/xml_tree_printer.rs index 7d3f747b..e61e6ef2 100644 --- a/rcdom/examples/xml_tree_printer.rs +++ b/rcdom/examples/xml_tree_printer.rs @@ -11,9 +11,7 @@ extern crate markup5ever_rcdom as rcdom; extern crate xml5ever; -use std::default::Default; use std::io; -use std::string::String; use rcdom::{Handle, NodeData, RcDom}; use xml5ever::driver::parse_document; diff --git a/rcdom/lib.rs b/rcdom/lib.rs index 3789d8c2..c53869a7 100644 --- a/rcdom/lib.rs +++ b/rcdom/lib.rs @@ -42,7 +42,6 @@ extern crate tendril; use std::borrow::Cow; use std::cell::{Cell, RefCell}; use std::collections::{HashSet, VecDeque}; -use std::default::Default; use std::fmt; use std::io; use std::mem; diff --git a/rcdom/tests/html-tokenizer.rs b/rcdom/tests/html-tokenizer.rs index 520a8301..9fa68e37 100644 --- a/rcdom/tests/html-tokenizer.rs +++ b/rcdom/tests/html-tokenizer.rs @@ -21,7 +21,6 @@ use html5ever::{namespace_url, ns, Attribute, LocalName, QualName}; use rustc_test::{DynTestFn, DynTestName, TestDesc, TestDescAndFn}; use serde_json::{Map, Value}; use std::borrow::Cow; -use std::default::Default; use std::ffi::OsStr; use std::io::Read; use std::fs::File; diff --git a/rcdom/tests/html-tree-builder.rs b/rcdom/tests/html-tree-builder.rs index e82116f4..e17ea695 100644 --- a/rcdom/tests/html-tree-builder.rs +++ b/rcdom/tests/html-tree-builder.rs @@ -16,7 +16,6 @@ mod foreach_html5lib_test; use foreach_html5lib_test::foreach_html5lib_test; use std::collections::{HashMap, HashSet}; -use std::default::Default; use std::ffi::OsStr; use std::io::BufRead; use std::iter::repeat;