Commit a2ed355
committed
Fix new clippy unnecessary_unwrap warning
error: called `unwrap` on `bytes_name` after checking its variant with `is_some`
--> generator/src/generator/namespace/mod.rs:573:49
|
572 | if bytes_name.is_some() && field_size == union_size {
| -------------------- the check is happening here
573 | outln!(out, "Self({})", bytes_name.unwrap());
| ^^^^^^^^^^^^^^^^^^^
|
= help: try using `match`
= help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_unwrap
= note: `-D clippy::unnecessary-unwrap` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::unnecessary_unwrap)]`
Signed-off-by: Uli Schlachter <psychon@znc.in>1 parent b9847ff commit a2ed355
1 file changed
+19
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
578 | 575 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
587 | 590 | | |
| 591 | + | |
| 592 | + | |
588 | 593 | | |
589 | | - | |
590 | | - | |
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
| |||
0 commit comments