Commit c2ddbdb
rust: pin-init: call
The `[pin_]init!` macros have the same behavior as the `try_[pin_]init!`
macros, except that they set the error type to `Infallible`.
Instead of calling the primitive `__init_internal!` with the correct
parameters, the same can thus be achieved by calling `try_[pin_]init!`.
Since this makes it more clear what their behavior is, simplify the
implementations of `[pin_]init!`.
Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Tested-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250308110339.2997091-7-benno.lossin@proton.me
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>try_[pin_]init! from [pin_]init! instead of __init_internal!
1 parent 84837cf commit c2ddbdb
1 file changed
Lines changed: 6 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
689 | 682 | | |
690 | 683 | | |
691 | 684 | | |
| |||
784 | 777 | | |
785 | 778 | | |
786 | 779 | | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
797 | 783 | | |
798 | 784 | | |
799 | 785 | | |
| |||
0 commit comments