resolve clippy lints
This commit is contained in:
parent
84328f0e2c
commit
173a896ab0
@ -6,9 +6,17 @@ use std::{
|
||||
|
||||
use crate::selector::{Selector, SelectorList};
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct ExtendedSelector(Rc<RefCell<SelectorList>>);
|
||||
|
||||
impl PartialEq for ExtendedSelector {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.0 == other.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for ExtendedSelector {}
|
||||
|
||||
impl Hash for ExtendedSelector {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.0.borrow().hash(state);
|
||||
|
@ -875,13 +875,13 @@ impl Extender {
|
||||
.replace(&mut media_query_context);
|
||||
}
|
||||
let extended_selector = ExtendedSelector::new(selector.clone());
|
||||
self.register_selector(selector, extended_selector.clone());
|
||||
self.register_selector(selector, &extended_selector);
|
||||
extended_selector
|
||||
}
|
||||
|
||||
/// Registers the `SimpleSelector`s in `list` to point to `selector` in
|
||||
/// `self.selectors`.
|
||||
fn register_selector(&mut self, list: SelectorList, selector: ExtendedSelector) {
|
||||
fn register_selector(&mut self, list: SelectorList, selector: &ExtendedSelector) {
|
||||
for complex in list.components {
|
||||
for component in complex.components {
|
||||
if let ComplexSelectorComponent::Compound(component) = component {
|
||||
@ -896,7 +896,7 @@ impl Extender {
|
||||
..
|
||||
}) = simple
|
||||
{
|
||||
self.register_selector(simple_selector, selector.clone());
|
||||
self.register_selector(simple_selector, selector);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1145,7 +1145,7 @@ impl Extender {
|
||||
if old_value == selector_as_selector {
|
||||
continue;
|
||||
}
|
||||
self.register_selector(selector_as_selector, selector);
|
||||
self.register_selector(selector_as_selector, &selector);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user