Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-27 08:28:45 +02:00
parent 9e9a227332
commit dd96cc4bf3
3 changed files with 28 additions and 30 deletions

View File

@@ -155,12 +155,11 @@ pub async fn sync_device(body: web::Json<JWTRequest>, actor: WebEnergyActor) ->
let mut available_update = None;
// Check if the version is available
if let Some(desired) = device.desired_version {
if claims.info.version < desired
&& ota_manager::update_exists(OTAPlatform::from_str(&claims.info.reference)?, &desired)?
{
available_update = Some(desired);
}
if let Some(desired) = device.desired_version
&& claims.info.version < desired
&& ota_manager::update_exists(OTAPlatform::from_str(&claims.info.reference)?, &desired)?
{
available_update = Some(desired);
}
Ok(HttpResponse::Ok().json(SyncResult {