From e282375de4ba75c69f7d619fc33c6250f6caba18 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 6 Nov 2022 17:20:45 +0100 Subject: fix: allow declaring a concrete type as it's own interface --- macros/src/declare_interface_args.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'macros/src/declare_interface_args.rs') diff --git a/macros/src/declare_interface_args.rs b/macros/src/declare_interface_args.rs index bd2f24e..1641e38 100644 --- a/macros/src/declare_interface_args.rs +++ b/macros/src/declare_interface_args.rs @@ -1,6 +1,6 @@ use syn::parse::{Parse, ParseStream, Result}; use syn::punctuated::Punctuated; -use syn::{Path, Token, Type}; +use syn::{Token, TypePath}; use crate::macro_flag::MacroFlag; use crate::util::iterator_ext::IteratorExt; @@ -9,8 +9,8 @@ pub const DECLARE_INTERFACE_FLAGS: &[&str] = &["async"]; pub struct DeclareInterfaceArgs { - pub implementation: Type, - pub interface: Path, + pub implementation: TypePath, + pub interface: TypePath, pub flags: Punctuated, } @@ -18,11 +18,11 @@ impl Parse for DeclareInterfaceArgs { fn parse(input: ParseStream) -> Result { - let implementation: Type = input.parse()?; + let implementation: TypePath = input.parse()?; input.parse::]>()?; - let interface: Path = input.parse()?; + let interface: TypePath = input.parse()?; let flags = if input.peek(Token![,]) { input.parse::()?; -- cgit v1.2.3-18-g5258