bkchr / proc-macro-crate

`$crate` in procedural macros.
Apache License 2.0
65 stars 17 forks source link

Fix finding crates which import itself #31

Closed bkchr closed 1 year ago

bkchr commented 1 year ago

This fixes an issue for crates that import itself. Before we would have returned FoundCrate::Name("the-name-of-the-other-instance") instead of FoundCrate::Itself. This pull request fixes this behavior by ensuring that it returns FoundCrate::Itself.

Closes: https://github.com/bkchr/proc-macro-crate/issues/26