Skip to content

Commit

Permalink
make cloudflare-derive-macros work externally
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasqueirozb committed Jan 22, 2024
1 parent 857e502 commit adec937
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cloudflare-derive-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate proc_macro;

use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, DeriveInput};
Expand All @@ -10,7 +8,7 @@ pub fn api_result_derive(input: TokenStream) -> TokenStream {
let name = &ast.ident;

let gen = quote! {
impl crate::framework::response::ApiResult for #name {}
impl ::cloudflare::framework::response::ApiResult for #name {}
};

gen.into()
Expand All @@ -22,7 +20,7 @@ pub fn vec_api_result_derive(input: TokenStream) -> TokenStream {
let name = &ast.ident;

let gen = quote! {
impl crate::framework::response::ApiResult for Vec<#name> {}
impl ::cloudflare::framework::response::ApiResult for Vec<#name> {}
};

gen.into()
Expand Down
1 change: 1 addition & 0 deletions cloudflare/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![forbid(unsafe_code)]
extern crate self as cloudflare;

pub mod endpoints;
pub mod framework;

0 comments on commit adec937

Please sign in to comment.