Closed conqp closed 4 months ago
I am highly sceptical this will be possible soon as this would require things like selectors::parser::SelectorList::parse
to be const.
Probably. I'm currently using once_cell::sync::Lazy
to work around this limitation.
OnceCell is now part of the standard library: https://github.com/rust-lang/rfcs/pull/2788 I think this should be considered the solution to this issue, since we cannot make Selector const-creatable
Currently we cannot create
const SELECTOR: Selector = ...
object, due toSelector::parse
not being const. This in turn would requirecssparser::Tokenizer::new()
andcssparser::Tokenizer::with_first_line_number()
to be const as well. I think that this would be possible to do.