From 721ce459de3ab346ef804045866bfed0a0cd034e Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Fri, 2 Oct 2026 04:48:37 +0200 Subject: [PATCH] feat: Serve never returns --- src/lib.rs | 2 +- src/tftp/server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e8987b7..4a6c23c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(path_absolute_method)] +#![feature(path_absolute_method, never_type)] use std::path::{Path, PathBuf}; use std::sync::OnceLock; diff --git a/src/tftp/server.rs b/src/tftp/server.rs index 3a5891b..bf926b5 100644 --- a/src/tftp/server.rs +++ b/src/tftp/server.rs @@ -145,7 +145,7 @@ where Ok(()) } -pub async fn serve(callback: F) -> Result<(), Error> +pub async fn serve(callback: F) -> Result where F: Fn(&str) -> Fut + Clone + Send + 'static, Fut: Future>> + Send + 'static,