♻️ (macros): Adapta main y test a Tokio
`#[pagetop::main]` y `#[pagetop::test]` expanden ahora a `#[tokio::main]` y `#[tokio::test]`, eliminando la dependencia de Actix-web.
This commit is contained in:
parent
c1afe0e70c
commit
7d43742a11
5 changed files with 12 additions and 13 deletions
|
|
@ -4,7 +4,7 @@ use proc_macro2::TokenStream;
|
|||
use proc_macro2_diagnostics::{Diagnostic, SpanDiagnosticExt};
|
||||
use quote::ToTokens;
|
||||
use syn::{
|
||||
braced, bracketed,
|
||||
Error, Expr, Ident, Lit, LitBool, LitInt, LitStr, Local, Pat, Stmt, braced, bracketed,
|
||||
ext::IdentExt,
|
||||
parenthesized,
|
||||
parse::{Lookahead1, Parse, ParseStream},
|
||||
|
|
@ -14,7 +14,6 @@ use syn::{
|
|||
At, Brace, Bracket, Colon, Comma, Dot, Else, Eq, FatArrow, For, If, In, Let, Match, Minus,
|
||||
Paren, Pound, Question, Semi, Slash, While,
|
||||
},
|
||||
Error, Expr, Ident, Lit, LitBool, LitInt, LitStr, Local, Pat, Stmt,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
|
@ -1079,7 +1078,7 @@ impl<E: ToTokens> ToTokens for MatchArm<E> {
|
|||
|
||||
pub trait DiagnosticParse: Sized {
|
||||
fn diagnostic_parse(input: ParseStream, diagnostics: &mut Vec<Diagnostic>)
|
||||
-> syn::Result<Self>;
|
||||
-> syn::Result<Self>;
|
||||
}
|
||||
|
||||
impl<T: DiagnosticParse> DiagnosticParse for Box<T> {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use proc_macro2::{Ident, Span, TokenStream};
|
||||
use quote::{quote, ToTokens};
|
||||
use syn::{parse_quote, token::Brace, Expr, Local};
|
||||
use quote::{ToTokens, quote};
|
||||
use syn::{Expr, Local, parse_quote, token::Brace};
|
||||
|
||||
use crate::maud::{ast::*, escape};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue