diff --git a/endpoint/src/topo.rs b/endpoint/src/topo.rs index 206c8136a..85f97561a 100644 --- a/endpoint/src/topo.rs +++ b/endpoint/src/topo.rs @@ -20,7 +20,7 @@ procs::topology_dispatcher! { UuidService(crate::uuid::topo::UuidService), } - #[procs::dispatcher_trait_deref] + #[procs::dispatcher_trait_deref] pub trait Endpoint: Sized + Send + Sync { type Item; fn send(&self, req: Self::Item); diff --git a/procs/src/endpoint.rs b/procs/src/endpoint.rs index 816327fa2..7b4c054d0 100644 --- a/procs/src/endpoint.rs +++ b/procs/src/endpoint.rs @@ -88,6 +88,10 @@ pub fn topology_dispatcher(input: TokenStream) -> TokenStream { // 2. 使用每个单词的首字母 let caps: String = s.chars().filter(|c| c.is_uppercase()).collect(); endpoints.push(caps.to_lowercase()); + // 3. 特殊处理 + if s.eq("PhantomService") { + endpoints.push("pt".to_string()); + } quote! { #(#endpoints) | * => Ok(Self::#variant_ident(p.into())),