"humility hiffy --list" panics on some archives
bcantrill opened this issue · 0 comments
bcantrill commented
When run against some archives (and, notably, a recent Hubris release), humility hiffy --list
panics:
$ HUMILITY_ARCHIVE=./build-gimlet-c-dev-image-default-v1.0.2.zip humility -p archive hiffy --list
...
INTERFACE TASK
Sensor sensor
|
+--> Sensor.get
| id SensorId
| <ok> f32
| <error> SensorError
|
+--> Sensor.get_reading
| id SensorId
| <ok> Reading
| <error> SensorError
|
+--> Sensor.get_raw_reading
| id SensorId
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /home/bmc/.cargo/registry/src/github.com-1ecc6299db9ec823/multimap-0.8.3/src/lib.rs:822:45
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
As it turns out, this is due to havarnov/multimap#46. There is a fix for that issue, but we can also modify our code to avoid an iter()
(and replace it with keys()
-- which is what the code is trying to do anyway).