Skip to content

Commit

Permalink
Refactor async handler type + remove unused imports in lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Padi2312 committed Mar 10, 2024
1 parent 1e09367 commit 530344a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ pub struct Server {
logger: Logger,
}

type AsyncHandler = Box<
dyn Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>> + Send + 'static,
>;
pub type AsyncHandler = Box<dyn Fn(Request) -> Pin<Box<dyn Future<Output = Response>>>>;
// Route macro for registering routes in server
#[macro_export]
macro_rules! route {
Expand Down
4 changes: 2 additions & 2 deletions surfer_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extern crate proc_macro;

use proc_macro::TokenStream;
use quote::{format_ident, quote};
use syn::{parse_macro_input, ItemFn, LitStr};
use quote::quote;
use syn::{parse_macro_input, ItemFn};

#[proc_macro_attribute]
pub fn surfer_launch(_attr: TokenStream, item: TokenStream) -> TokenStream {
Expand Down

0 comments on commit 530344a

Please sign in to comment.