git-ref-format: import Qualified within macro

If the `qualified` macro was used, the compiler would complain that it
required an import of `Qualified`.

Fixed by importing Qualified within the unsafe block of the definition
of `qualified`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
Fintan Halpenny
2022-11-16 13:40:48 +00:00
parent d7fb4ab984
commit 629191f55a
+1 -1
View File
@@ -66,7 +66,7 @@ pub fn qualified(input: TokenStream) -> TokenStream {
let expand = quote! {
unsafe {
use ::std::{borrow::Cow, mem::transmute};
use ::git_ref_format::{Component, RefStr, RefString};
use ::git_ref_format::{Component, RefStr, RefString, Qualified};
let inner: RefString = transmute(#safe.to_owned());
let cow: Cow<'static, RefStr> = Cow::Owned(inner);