From d1b7e20109615ea7169e3f842ec0bfd8b5af4de9 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 9 Sep 2024 17:13:41 +0200 Subject: [PATCH 1/2] chore: Use proc-macro-error2 instead of proc-macro-error Since the latter is not maintained anymore. Fixes #45. --- Cargo.toml | 2 +- src/attrs.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 851fe3b..f38a4d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ proc-macro = true [dependencies] quote = "1" proc-macro2 = "1" -proc-macro-error = { version = "1", default-features = false } +proc-macro-error2 = { version = "2", default-features = false } itertools = "0.10" syn = "2" include_dir = "0.7" diff --git a/src/attrs.rs b/src/attrs.rs index ad541ff..358fecd 100644 --- a/src/attrs.rs +++ b/src/attrs.rs @@ -2,7 +2,7 @@ use include_dir::{include_dir, Dir}; use itertools::Itertools; use proc_macro::Span; use proc_macro2::TokenStream; -use proc_macro_error::{abort, emit_call_site_warning, emit_error}; +use proc_macro_error2::{abort, emit_call_site_warning, emit_error}; use quote::quote; use std::fs; use std::path::Path; diff --git a/src/lib.rs b/src/lib.rs index 5c81d85..8776881 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,7 +74,7 @@ extern crate proc_macro; use proc_macro::TokenStream; -use proc_macro_error::{abort, proc_macro_error}; +use proc_macro_error2::{abort, proc_macro_error}; use quote::quote; use syn::{parse_macro_input, Attribute}; From b15b3cd902988440b614338965954c1917dbcc28 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 9 Sep 2024 17:13:48 +0200 Subject: [PATCH 2/2] chore: address typo in code. --- src/attrs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attrs.rs b/src/attrs.rs index 358fecd..860ace1 100644 --- a/src/attrs.rs +++ b/src/attrs.rs @@ -9,7 +9,7 @@ use std::path::Path; use std::{iter, path::PathBuf}; use syn::{Attribute, Ident, MetaNameValue}; -// embedded JS code being inserted as html script elmenets +// embedded JS code being inserted as html script elements static MERMAID_JS_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/doc/js/"); // Note: relative path depends on sub-module the macro is invoked in: