From 0519ca3efe60b2c2191382cf7387753e263aa494 Mon Sep 17 00:00:00 2001 From: Empire Phoenix Date: Fri, 31 Oct 2025 23:39:10 +0100 Subject: [PATCH] read and write to nal --- Software/MainBoard/rust/src/webserver/backup_manager.rs | 2 +- Software/MainBoard/rust/src/webserver/file_manager.rs | 2 +- Software/MainBoard/rust/src/webserver/get_json.rs | 2 +- Software/MainBoard/rust/src/webserver/get_log.rs | 2 +- Software/MainBoard/rust/src/webserver/get_static.rs | 2 +- Software/MainBoard/rust/src/webserver/mod.rs | 4 ++-- Software/MainBoard/rust/src/webserver/ota.rs | 2 +- Software/MainBoard/rust/src/webserver/post_json.rs | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Software/MainBoard/rust/src/webserver/backup_manager.rs b/Software/MainBoard/rust/src/webserver/backup_manager.rs index 8143b33..ef6c4b0 100644 --- a/Software/MainBoard/rust/src/webserver/backup_manager.rs +++ b/Software/MainBoard/rust/src/webserver/backup_manager.rs @@ -6,7 +6,7 @@ use alloc::format; use alloc::string::{String, ToString}; use chrono::DateTime; use edge_http::io::server::Connection; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; use log::info; use serde::{Deserialize, Serialize}; diff --git a/Software/MainBoard/rust/src/webserver/file_manager.rs b/Software/MainBoard/rust/src/webserver/file_manager.rs index ddf7c16..03304ae 100644 --- a/Software/MainBoard/rust/src/webserver/file_manager.rs +++ b/Software/MainBoard/rust/src/webserver/file_manager.rs @@ -6,7 +6,7 @@ use alloc::format; use alloc::string::String; use edge_http::io::server::Connection; use edge_http::Method; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; use log::info; pub(crate) async fn list_files( diff --git a/Software/MainBoard/rust/src/webserver/get_json.rs b/Software/MainBoard/rust/src/webserver/get_json.rs index a23cb04..553e9e4 100644 --- a/Software/MainBoard/rust/src/webserver/get_json.rs +++ b/Software/MainBoard/rust/src/webserver/get_json.rs @@ -10,7 +10,7 @@ use alloc::vec::Vec; use chrono_tz::Tz; use core::str::FromStr; use edge_http::io::server::Connection; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; use log::info; use serde::Serialize; diff --git a/Software/MainBoard/rust/src/webserver/get_log.rs b/Software/MainBoard/rust/src/webserver/get_log.rs index 4cc5331..0f403a0 100644 --- a/Software/MainBoard/rust/src/webserver/get_log.rs +++ b/Software/MainBoard/rust/src/webserver/get_log.rs @@ -1,7 +1,7 @@ use crate::fat_error::FatResult; use crate::log::LOG_ACCESS; use edge_http::io::server::Connection; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; pub(crate) async fn get_log( conn: &mut Connection<'_, T, N>, diff --git a/Software/MainBoard/rust/src/webserver/get_static.rs b/Software/MainBoard/rust/src/webserver/get_static.rs index 26b1947..1db5be8 100644 --- a/Software/MainBoard/rust/src/webserver/get_static.rs +++ b/Software/MainBoard/rust/src/webserver/get_static.rs @@ -1,6 +1,6 @@ use crate::fat_error::FatError; use edge_http::io::server::Connection; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; pub(crate) async fn serve_favicon( conn: &mut Connection<'_, T, { N }>, diff --git a/Software/MainBoard/rust/src/webserver/mod.rs b/Software/MainBoard/rust/src/webserver/mod.rs index eb43111..de78ac6 100644 --- a/Software/MainBoard/rust/src/webserver/mod.rs +++ b/Software/MainBoard/rust/src/webserver/mod.rs @@ -32,11 +32,11 @@ use core::result::Result::Ok; use core::sync::atomic::{AtomicBool, Ordering}; use edge_http::io::server::{Connection, Handler, Server}; use edge_http::Method; +use edge_nal::io::{Read, Write}; use edge_nal::TcpBind; use edge_nal_embassy::{Tcp, TcpBuffers}; use embassy_net::Stack; use embassy_time::Instant; -use embedded_io_async::{Read, Write}; use log::{error, info}; struct HTTPRequestRouter { @@ -203,7 +203,7 @@ async fn handle_json<'a, T, const N: usize>( ) -> FatResult where T: Read + Write, - ::Error: Debug, + ::Error: Debug, { match chain { Ok(answer) => match answer { diff --git a/Software/MainBoard/rust/src/webserver/ota.rs b/Software/MainBoard/rust/src/webserver/ota.rs index 5744153..c8195df 100644 --- a/Software/MainBoard/rust/src/webserver/ota.rs +++ b/Software/MainBoard/rust/src/webserver/ota.rs @@ -3,7 +3,7 @@ use crate::webserver::read_up_to_bytes_from_request; use crate::BOARD_ACCESS; use edge_http::io::server::Connection; use edge_http::Method; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; use log::info; pub(crate) async fn ota_operations( diff --git a/Software/MainBoard/rust/src/webserver/post_json.rs b/Software/MainBoard/rust/src/webserver/post_json.rs index 50ac3e8..87c747f 100644 --- a/Software/MainBoard/rust/src/webserver/post_json.rs +++ b/Software/MainBoard/rust/src/webserver/post_json.rs @@ -7,7 +7,7 @@ use alloc::string::{String, ToString}; use alloc::vec::Vec; use chrono::DateTime; use edge_http::io::server::Connection; -use embedded_io_async::{Read, Write}; +use edge_nal::io::{Read, Write}; use log::info; use serde::{Deserialize, Serialize};