clippy fixes

This commit is contained in:
Robin Appelman 2022-08-01 20:56:54 +02:00
commit eeb6efb5f7
2 changed files with 2 additions and 2 deletions

View file

@ -195,7 +195,7 @@ impl DeviceState {
if let Some(version) = json["StatusFWR"]["Version"].as_str() {
self.firmware = version.into();
if let Some(version) = version
.rfind(".")
.rfind('.')
.map(|index| &version[0..index])
.and_then(|s| s.parse().ok())
{