feat: Serve never returns
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
#![feature(path_absolute_method)]
|
||||
#![feature(path_absolute_method, never_type)]
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::OnceLock;
|
||||
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn serve<F, Fut>(callback: F) -> Result<(), Error>
|
||||
pub async fn serve<F, Fut>(callback: F) -> Result<!, Error>
|
||||
where
|
||||
F: Fn(&str) -> Fut + Clone + Send + 'static,
|
||||
Fut: Future<Output = Option<Vec<u8>>> + Send + 'static,
|
||||
|
||||
Reference in New Issue
Block a user