From 7349b15ab827836412e907c9274653ec8e716c5b Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Sun, 29 Dec 2019 21:53:49 +1100 Subject: [PATCH] Reformatting --- src/main.rs | 2 +- src/pattern.rs | 1 + src/spec/tag/content.rs | 2 +- src/spec/tag/contentfirst.rs | 2 +- src/spec/tag/formatting.rs | 2 +- src/spec/tag/layout.rs | 2 +- src/spec/tag/void.rs | 2 +- src/spec/tag/wss.rs | 2 +- src/unit/bang.rs | 2 +- src/unit/comment.rs | 2 +- src/unit/content.rs | 2 +- src/unit/entity.rs | 5 +++-- src/unit/script/js.rs | 4 ++-- src/unit/script/text.rs | 2 +- src/unit/style.rs | 2 +- src/unit/tag.rs | 9 +++++---- 16 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/main.rs b/src/main.rs index 063ee06..c8e0b96 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use std::fs::File; -use std::io::{Read, Write, stderr}; +use std::io::{Read, stderr, Write}; use structopt::StructOpt; diff --git a/src/pattern.rs b/src/pattern.rs index 764408d..6e22dbb 100644 --- a/src/pattern.rs +++ b/src/pattern.rs @@ -1,4 +1,5 @@ use phf::Map; + use crate::proc::Processor; pub struct SinglePattern { diff --git a/src/spec/tag/content.rs b/src/spec/tag/content.rs index 90c35fb..caeae98 100644 --- a/src/spec/tag/content.rs +++ b/src/spec/tag/content.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; pub static CONTENT_TAGS: Set<&'static [u8]> = phf_set! { b"address", diff --git a/src/spec/tag/contentfirst.rs b/src/spec/tag/contentfirst.rs index 1d9ed4f..9db55d1 100644 --- a/src/spec/tag/contentfirst.rs +++ b/src/spec/tag/contentfirst.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; pub static CONTENT_FIRST_TAGS: Set<&'static [u8]> = phf_set! { b"dd", diff --git a/src/spec/tag/formatting.rs b/src/spec/tag/formatting.rs index f65c023..4ac2ca2 100644 --- a/src/spec/tag/formatting.rs +++ b/src/spec/tag/formatting.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; // Sourced from https://developer.mozilla.org/en-US/docs/Web/HTML/Element#Inline_text_semantics. // Differences to tags listed in table at above URL: -br, +del, +ins. diff --git a/src/spec/tag/layout.rs b/src/spec/tag/layout.rs index 80bfd4a..a9b9a49 100644 --- a/src/spec/tag/layout.rs +++ b/src/spec/tag/layout.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; pub static LAYOUT_TAGS: Set<&'static [u8]> = phf_set! { b"article", diff --git a/src/spec/tag/void.rs b/src/spec/tag/void.rs index ea87640..68b0b7c 100644 --- a/src/spec/tag/void.rs +++ b/src/spec/tag/void.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; pub static VOID_TAGS: Set<&'static [u8]> = phf_set! { b"area", diff --git a/src/spec/tag/wss.rs b/src/spec/tag/wss.rs index 90a434f..8470522 100644 --- a/src/spec/tag/wss.rs +++ b/src/spec/tag/wss.rs @@ -1,4 +1,4 @@ -use ::phf::{phf_set, Set}; +use phf::{phf_set, Set}; // "WSS" stands for whitespace-sensitive. pub static WSS_TAGS: Set<&'static [u8]> = phf_set! { diff --git a/src/unit/bang.rs b/src/unit/bang.rs index dc98eff..6f8523d 100644 --- a/src/unit/bang.rs +++ b/src/unit/bang.rs @@ -1,5 +1,5 @@ -use crate::proc::Processor; use crate::err::ProcessingResult; +use crate::proc::Processor; pub fn process_bang(proc: &mut Processor) -> ProcessingResult<()> { chain!(proc.match_seq(b" ProcessingResult<()> { chain!(proc.match_seq(b"