Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Fix module macro
Browse files Browse the repository at this point in the history
  • Loading branch information
willothy committed Feb 25, 2023
1 parent f3e3a8b commit 575d64a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "nvim-utils"
version = "0.1.7"
version = "0.1.8"
edition = "2021"
description = "Utilities for writing neovim plugins in rust"
authors = ["Will Hopkins <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Using `nvim-utils` is as simple as adding it to your `Cargo.toml`:

```toml
[dependencies]
nvim-utils = "0.1.7"
nvim-utils = "0.1.8"
```

or
Expand Down
4 changes: 2 additions & 2 deletions macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use mlua::lua_State;
use proc_macro::TokenStream;
use proc_macro2::Span;
use quote::quote;
use syn::{AttributeArgs, Error, Path, Result};
use syn::{AttributeArgs, Error, Ident, Path, Result};

struct Plugin {
path: Path,
Expand Down Expand Up @@ -47,7 +47,7 @@ pub fn module(attr: TokenStream, item: TokenStream) -> TokenStream {
.join("_");

let func = syn::parse_macro_input!(item as syn::ItemFn);
let name = func.sig.ident.to_string();
let name = func.sig.ident.clone();

let entry = Ident::new(&format!("luaopen_{path}"), Span::call_site());
let wrapped = quote! {
Expand Down

0 comments on commit 575d64a

Please sign in to comment.