mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Migrate all crates to the 2018 edition
Most of the CLI crates were already in the 2018 edition, and it turns out that one of the macro crates was already in the 2018 edition so we may as well move everything to the 2018 edition! Always nice to remove those `extern crate` statements nowadays! This commit also does a `cargo fmt --all` to make sure we're conforming with style again.
This commit is contained in:
@ -1,15 +1,13 @@
|
||||
#![doc(html_root_url = "https://docs.rs/wasm-bindgen-macro/0.2")]
|
||||
|
||||
extern crate proc_macro;
|
||||
#[macro_use]
|
||||
extern crate quote;
|
||||
extern crate wasm_bindgen_macro_support as macro_support;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use quote::quote;
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
match macro_support::expand(attr.into(), input.into()) {
|
||||
match wasm_bindgen_macro_support::expand(attr.into(), input.into()) {
|
||||
Ok(tokens) => {
|
||||
if cfg!(feature = "xxx_debug_only_print_generated_code") {
|
||||
println!("{}", tokens);
|
||||
@ -22,7 +20,7 @@ pub fn wasm_bindgen(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn __wasm_bindgen_class_marker(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
match macro_support::expand_class_marker(attr.into(), input.into()) {
|
||||
match wasm_bindgen_macro_support::expand_class_marker(attr.into(), input.into()) {
|
||||
Ok(tokens) => {
|
||||
if cfg!(feature = "xxx_debug_only_print_generated_code") {
|
||||
println!("{}", tokens);
|
||||
|
Reference in New Issue
Block a user