mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Lint layout_2013 with clippy (#31221)
* Lint layout_2013 with clippy CARGO_BUILD_RUSTC=rustc cargo clippy --fix -p layout_2013 --broken-code * ./mach fmt * Cosmetic adjustments
This commit is contained in:
parent
16cabcf736
commit
f7ead9bcb6
28 changed files with 490 additions and 483 deletions
|
@ -44,7 +44,7 @@ where
|
|||
pub fn prepend_elem(&self, value: T) -> PersistentList<T> {
|
||||
PersistentList {
|
||||
head: Some(Arc::new(PersistentListEntry {
|
||||
value: value,
|
||||
value,
|
||||
next: self.head.clone(),
|
||||
})),
|
||||
length: self.length + 1,
|
||||
|
@ -56,7 +56,7 @@ where
|
|||
// This could clone (and would not need the lifetime if it did), but then it would incur
|
||||
// atomic operations on every call to `.next()`. Bad.
|
||||
PersistentListIterator {
|
||||
entry: self.head.as_ref().map(|head| &**head),
|
||||
entry: self.head.as_deref(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue