If server query returns an invalid JSON response, the program panics. Other commands will still work, but the presence will stop updating.
missing field `version` at line 1 column 2
invalid JSON response: "{}"
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/handler.rs:80:61
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This error originates from
|
for player in status.players.sample.unwrap() { |
Fix should handle None case to avoid panic
If server query returns an invalid JSON response, the program panics. Other commands will still work, but the presence will stop updating.
This error originates from
mcbot-rs/src/handler.rs
Line 80 in 7283bcf
Fix should handle
Nonecase to avoid panic