mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #29123 - michaelgrigoryan25:master, r=jdm
Replaced explicit Default implementation for Seed with derive. <!-- Please describe your changes on the following line: --> This patch replaces the explicit `std::default::Default` implementation of the [Seed](https://github.com/servo/servo/blob/master/components/rand/lib.rs) struct with a derive macro. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [x] These changes do not require tests. <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
495846f306
1 changed files with 1 additions and 6 deletions
|
@ -63,14 +63,9 @@ impl RngCore for ServoRng {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Seed([u8; 32]);
|
||||
|
||||
impl Default for Seed {
|
||||
fn default() -> Self {
|
||||
Seed([0; 32])
|
||||
}
|
||||
}
|
||||
|
||||
impl AsMut<[u8]> for Seed {
|
||||
fn as_mut(&mut self) -> &mut [u8] {
|
||||
&mut self.0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue