Commit bd22a2d
refactor(pcie): avoid string format on good path
If a function is called in the `.ok_or`, this gets executed
independently on whether the function succeeds or not, although the
result is only used on failure.
Replace it with a .ok_or_else to avoid a useless string allocation and
memcpy.
Signed-off-by: Riccardo Mancini <[email protected]>
Signed-off-by: Babis Chalios <[email protected]>1 parent efccd18 commit bd22a2d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
0 commit comments