mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fixed some clippy warning by adding default implementations (#31989)
* Fixed some clippy warning by adding default implementations * Updated PR that adds default implementation of structs * Clean up and extend `Default` implementations --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
62a916ce5c
commit
df457c43c8
10 changed files with 28 additions and 71 deletions
|
@ -56,16 +56,12 @@ pub enum TimeRangesError {
|
|||
OutOfRange,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, JSTraceable, MallocSizeOf)]
|
||||
#[derive(Clone, Debug, Default, JSTraceable, MallocSizeOf)]
|
||||
pub struct TimeRangesContainer {
|
||||
ranges: Vec<TimeRange>,
|
||||
}
|
||||
|
||||
impl TimeRangesContainer {
|
||||
pub fn new() -> Self {
|
||||
Self { ranges: Vec::new() }
|
||||
}
|
||||
|
||||
pub fn len(&self) -> u32 {
|
||||
self.ranges.len() as u32
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue