fix macro pin_handler visibility

This commit is contained in:
MeexReay 2024-08-29 02:51:49 +03:00
parent febaf3073b
commit 066bb286d4
3 changed files with 3 additions and 4 deletions

View File

@ -42,14 +42,13 @@ pub async fn handler_connection<S: HttpServer + Send + 'static>(
}
}
#[macro_export]
macro_rules! pin_handler {
($handler: expr) => {
Box::new(move |a, b| Box::pin($handler(a, b)))
};
}
pub(crate) use pin_handler;
#[cfg(feature = "http_rrs")]
/// HTTP_RRS handler
pub async fn handler_http_rrs<S: HttpServer + Send + 'static>(

View File

@ -28,7 +28,6 @@ pub use starter::*;
pub use handler::*;
async fn read_line(data: &mut (impl AsyncReadExt + Unpin)) -> Result<String, HttpError> {
let mut line = Vec::new();
loop {

View File

@ -1,8 +1,9 @@
use tokio::task::JoinHandle;
use super::{
handler_connection, pin_handler, start_server_new_thread, start_server_sync, start_server_with_threadpool, Handler, HttpServer
handler_connection, start_server_new_thread, start_server_sync, start_server_with_threadpool, Handler, HttpServer
};
use crate::pin_handler;
use std::{
error::Error, sync::{