Commit 53e6b78
committed
fix: suppress dead code warnings in cache_info.rs
The unittests here rely on the cfg(not(test)) antipattern for mocking,
which new rust compiler interprets as the production version of the
structs being dead-code when running unittests.
Refactoring this to eliminate mocking is difficult, because fdt unit
tests rely on the mocks removing all host-specific information from the
cpu FDT nodes (particularly cache information, which in prod is read
from the host sysfs, but in test mode is some dummy mock values).
(cherry picked from commit cdbfac0)
Signed-off-by: Patrick Roy <[email protected]>1 parent 084d59b commit 53e6b78
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
0 commit comments