On MacMini M1(or maybe all devices with macOS 12, I haven't tested on other macs), FullyCharged and DesignCapacity are missing.
However, current both of them are required or PowerSource will throw an error. SourceCode e.g. the following error
[WARN] - (starship::modules::battery): Unable to access battery information:
FullyCharged
This pr makes PowerSource accepts empty FullyCharged and DesignCapacity.
If they are missing, users will get a default value. (i.e. true for FullyCharged and Default::default() for DesignCapacity).
On MacMini M1(or maybe all devices with macOS 12, I haven't tested on other macs),
FullyCharged
andDesignCapacity
are missing. However, current both of them are required orPowerSource
will throw an error. SourceCode e.g. the following errorThis pr makes
PowerSource
accepts emptyFullyCharged
andDesignCapacity
. If they are missing, users will get a default value. (i.e.true
forFullyCharged
andDefault::default()
forDesignCapacity
).