Fix clippy warnings in components/rand (#31549)

* resolved clippy warnings in components/rand

Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>

* replaced new() with default()

Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>

* replaced ServoRng::new() with ServoRng::default()

Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>

* moved the contents of the new() method into the default() method

Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>

---------

Signed-off-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>
Co-authored-by: Sandeep Pillai <sandeeppillai@Sandeeps-MacBook-Air.local>
This commit is contained in:
sandeep 2024-03-08 04:46:42 +05:30 committed by GitHub
parent e4ac047a9c
commit 64d013d473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View file

@ -29,7 +29,7 @@ impl Crypto {
fn new_inherited() -> Crypto {
Crypto {
reflector_: Reflector::new(),
rng: DomRefCell::new(ServoRng::new()),
rng: DomRefCell::new(ServoRng::default()),
}
}