Open
Bug 1465381
Opened 7 years ago
Updated 2 years ago
Make use of nicer match bindings for references
Categories
(Testing :: geckodriver, enhancement, P3)
Testing
geckodriver
Tracking
(Not tracked)
NEW
People
(Reporter: whimboo, Unassigned)
References
()
Details
With Rust 1.26 we got nicer match bindings. For details see the URL field.
What looks kinda helpful is that it can be simplified a lot when using a reference. Here an example:
Before:
> impl ToJson for NullActionItem {
> fn to_json(&self) -> Json {
> match self {
> &NullActionItem::General(ref x) => x.to_json(),
> }
> }
> }
After:
> impl ToJson for NullActionItem {
> fn to_json(&self) -> Json {
> match self {
> NullActionItem::General(x) => x.to_json(),
> }
> }
> }
A separate bug can be filed for mozbase-rust crates.
Reporter | ||
Updated•7 years ago
|
Updated•7 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•