mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Support custom derives for generated types (#34356)
* script: Derive more Default implementations for dictionaries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives on generated enums. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives for generated dictionaries. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Support arbitrary derives for generated unions. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Derive more impls for generated dicts and unions. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * script: Implement FromStr for generated enums. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * Fix clippy. Signed-off-by: Josh Matthews <josh@joshmatthews.net> * crown: Allow returning unrooted values from Default::default. Signed-off-by: Josh Matthews <josh@joshmatthews.net> --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
3faed9b921
commit
c60e4afbee
10 changed files with 124 additions and 129 deletions
|
@ -857,16 +857,3 @@ impl From<NetTraitsRequestRedirect> for RequestRedirect {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for HeadersInit {
|
||||
fn clone(&self) -> HeadersInit {
|
||||
match self {
|
||||
HeadersInit::ByteStringSequenceSequence(b) => {
|
||||
HeadersInit::ByteStringSequenceSequence(b.clone())
|
||||
},
|
||||
HeadersInit::ByteStringByteStringRecord(m) => {
|
||||
HeadersInit::ByteStringByteStringRecord(m.clone())
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue