jid: use "jid" instead of "::jid" in quote support

This causes issues in crates using it because they need to have "jid"
listed as a direct dependency when it's not always obvious (version
mismatch etc. when something already uses jid as a dep)

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2025-08-30 10:04:58 +02:00 committed by Link Mauve
commit b1c80f4071
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,10 @@
Version NEXT:
* Changes:
- The 'quote' feature now uses `jid::Jid` instead of `::jid::Jid` to
stop requiring importing the module as a dependency of the project. The
`jid` module just needs to be made available, for example: `use
foo::jid;`
Version 0.12.0, release 2025-01-25:
* Breaking:
- domainparts are now checked much more in-depth, using the idna crate for

View file

@ -688,7 +688,7 @@ impl ToTokens for Jid {
fn to_tokens(&self, tokens: &mut TokenStream) {
let s = &self.normalized;
tokens.extend(quote! {
::jid::Jid::new(#s).unwrap()
jid::Jid::new(#s).unwrap()
});
}
}
@ -698,7 +698,7 @@ impl ToTokens for FullJid {
fn to_tokens(&self, tokens: &mut TokenStream) {
let s = &self.inner.normalized;
tokens.extend(quote! {
::jid::FullJid::new(#s).unwrap()
jid::FullJid::new(#s).unwrap()
});
}
}
@ -708,7 +708,7 @@ impl ToTokens for BareJid {
fn to_tokens(&self, tokens: &mut TokenStream) {
let s = &self.inner.normalized;
tokens.extend(quote! {
::jid::BareJid::new(#s).unwrap()
jid::BareJid::new(#s).unwrap()
});
}
}