remove clone from extend_simple

This commit is contained in:
Connor Skees 2020-07-04 13:10:51 -04:00
parent d79488b00f
commit 95c8b8d123

View File

@ -542,12 +542,15 @@ impl Extender {
media_query_context: &Option<Vec<CssMediaQuery>>,
targets_used: &mut HashSet<SimpleSelector>,
) -> Option<Vec<Vec<Extension>>> {
if let SimpleSelector::Pseudo(
simple @ Pseudo {
if let SimpleSelector::Pseudo(Pseudo {
selector: Some(..), ..
},
) = simple.clone()
}) = &simple
{
let simple = if let SimpleSelector::Pseudo(pseudo) = simple.clone() {
pseudo
} else {
unreachable!()
};
if let Some(extended) = self.extend_pseudo(simple, extensions, media_query_context) {
return Some(
extended