From eb91000fed1d423f731624d579865e18055b029e Mon Sep 17 00:00:00 2001 From: OMGeeky <39029799+OMGeeky@users.noreply.github.com> Date: Sat, 13 Jan 2024 13:19:32 -0800 Subject: [PATCH] cleanup std usages see https://doc.rust-lang.org/reference/procedural-macros.html#procedural-macro-hygiene --- plugins/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/src/lib.rs b/plugins/src/lib.rs index f33cea0..d5ccf5b 100644 --- a/plugins/src/lib.rs +++ b/plugins/src/lib.rs @@ -420,7 +420,7 @@ impl<'a> ServiceGenerator<'a> { type Req = #request_ident; type Resp = #response_ident; - fn method(&self, req: &#request_ident) -> Option<&'static str> { + fn method(&self, req: &#request_ident) -> ::std::option::Option<&'static str> { Some(match req { #( #request_ident::#camel_case_idents{..} => { @@ -431,7 +431,7 @@ impl<'a> ServiceGenerator<'a> { } async fn serve(self, ctx: tarpc::context::Context, req: #request_ident) - -> Result<#response_ident, tarpc::ServerError> { + -> ::std::result::Result<#response_ident, tarpc::ServerError> { match req { #( #request_ident::#camel_case_idents{ #( #arg_pats ),* } => { @@ -578,12 +578,12 @@ impl<'a> ServiceGenerator<'a> { #[allow(unused)] #( #method_attrs )* #vis fn #method_idents(&self, ctx: tarpc::context::Context, #( #args ),*) - -> impl std::future::Future> + '_ { + -> impl ::std::future::Future> + '_ { let request = #request_ident::#camel_case_idents { #( #arg_pats ),* }; let resp = self.0.call(ctx, #request_names, request); async move { match resp.await? { - #response_ident::#camel_case_idents(msg) => std::result::Result::Ok(msg), + #response_ident::#camel_case_idents(msg) => ::std::result::Result::Ok(msg), _ => unreachable!(), } }