Skip to content

Commit

Permalink
Replace with helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jroesch committed Jun 9, 2020
1 parent 387766c commit 8c7d99b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions rust/macros/src/external.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
use proc_macro2::Span;
use quote::quote;
use std::env;
use syn::parse::{Parse, ParseStream, Result};

use syn::{FnArg, Generics, Ident, Lit, Meta, NestedMeta, Pat, ReturnType, TraitItemMethod, Type};
Expand Down Expand Up @@ -87,11 +86,7 @@ impl Parse for ExternalInput {
pub fn macro_impl(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
let ext_input = syn::parse_macro_input!(input as ExternalInput);

let tvm_rt_crate = if env::var("CARGO_PKG_NAME").unwrap() == "tvm-rt" {
quote!(crate)
} else {
quote!(tvm_rt)
};
let tvm_rt_crate = crate::util::get_tvm_rt_crate();

let err_type = quote! { #tvm_rt_crate::Error };

Expand Down

0 comments on commit 8c7d99b

Please sign in to comment.