I would like to use ToCss for the Selector. Selector is basically a wrapper of the cssparser::SelectorList which implements this trait too.
SelectorList is containing exactly the content of Selector::selectors but with redeclaring it and requiring the explicit dependency on smallvec. Changing this removes smallvec as a direct dependency. This should even have the same memory footprint as Rust optimizes the wrapper struct away.
Using pub for the use ToCSS is probably debatable but I think its a good thing to easily allow to use to_css and to_css_string without specifying the cssparser dependency explicitly and rather use scraper::selector::ToCss instead.
I would like to use ToCss for the
Selector
.Selector
is basically a wrapper of thecssparser::SelectorList
which implements this trait too.SelectorList
is containing exactly the content ofSelector::selectors
but with redeclaring it and requiring the explicit dependency onsmallvec
. Changing this removessmallvec
as a direct dependency. This should even have the same memory footprint as Rust optimizes the wrapper struct away.Using
pub
for theuse ToCSS
is probably debatable but I think its a good thing to easily allow to useto_css
andto_css_string
without specifying the cssparser dependency explicitly and rather usescraper::selector::ToCss
instead.