fix warnings
All checks were successful
build docker container automatically / build (push) Successful in 3m43s

This commit is contained in:
2026-07-10 22:43:49 +02:00
parent 4684b0c5ea
commit 5d2405cdfb

View File

@ -9,7 +9,6 @@ use pbkdf2::{
use tokio::net::TcpStream;
use tokio::io::AsyncWriteExt;
use tokio::io::AsyncReadExt;
use std::error::Error;
static COMMANDS: [(&str, u8); 3] = [("start", 0x1) , ("stop", 0x2), ("reboot", 0x3)];
@ -45,8 +44,6 @@ async fn pc_boot(command: String, pass: String) -> Result<String, HttpError> {
1 => { return Ok("Failed".to_string()) },
_ => { return Ok("Invalid response".to_string()) }
}
Ok("Hello".to_string())
}
#[get("/api/pc/status")]
@ -60,8 +57,8 @@ async fn pc_status() -> Result<i32, HttpError> {
}
async fn esp_boot_request(command: u8) -> Result<i32, tokio::io::Error> {
let mut stream = None;
let mut retry = 3;
let mut stream;
println!("send request to esp");
loop {