mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
clippy: Fix len_zero warnings (#31935)
This commit is contained in:
parent
49c6b2668f
commit
c3b6d40f90
5 changed files with 7 additions and 7 deletions
|
@ -213,7 +213,7 @@ impl Performance {
|
|||
let buffer = self.buffer.borrow();
|
||||
let mut new_entries =
|
||||
buffer.get_entries_by_name_and_type(None, Some(entry_type.clone()));
|
||||
if new_entries.len() > 0 {
|
||||
if !new_entries.is_empty() {
|
||||
let mut obs_entries = observer.entries();
|
||||
obs_entries.append(&mut new_entries);
|
||||
observer.set_entries(obs_entries);
|
||||
|
@ -408,7 +408,7 @@ impl PerformanceMethods for Performance {
|
|||
// https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/NavigationTiming/Overview.html#performance-timing-attribute
|
||||
fn Timing(&self) -> DomRoot<PerformanceNavigationTiming> {
|
||||
let entries = self.GetEntriesByType(DOMString::from("navigation"));
|
||||
if entries.len() > 0 {
|
||||
if !entries.is_empty() {
|
||||
return DomRoot::from_ref(
|
||||
entries[0]
|
||||
.downcast::<PerformanceNavigationTiming>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue