feat: Serve never returns

This commit is contained in:
2026-10-03 21:41:21 +02:00
parent 50c1b35de1
commit cf8dd0f24d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#![feature(path_absolute_method)] #![feature(path_absolute_method, never_type)]
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::sync::OnceLock; use std::sync::OnceLock;
+1 -1
View File
@@ -145,7 +145,7 @@ where
Ok(()) Ok(())
} }
pub async fn serve<F, Fut>(callback: F) -> Result<(), Error> pub async fn serve<F, Fut>(callback: F) -> Result<!, Error>
where where
F: Fn(&str) -> Fut + Clone + Send + 'static, F: Fn(&str) -> Fut + Clone + Send + 'static,
Fut: Future<Output = Option<Vec<u8>>> + Send + 'static, Fut: Future<Output = Option<Vec<u8>>> + Send + 'static,