Commit 6b5d827
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 <mancio@amazon.com>1 parent 1e675c2 commit 6b5d827
1 file changed
Lines changed: 1 addition & 1 deletion
| 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