Skip to content

Commit 1ef5516

Browse files
no exec
1 parent 2a5a208 commit 1ef5516

File tree

1 file changed

+5
-4
lines changed
  • crates/pgt_workspace_macros/src

1 file changed

+5
-4
lines changed

crates/pgt_workspace_macros/src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ impl syn::parse::Parse for IgnoredPath {
3333
/// You can use this on a workspace server function to return a default if the specified path
3434
/// is ignored by the user's settings.
3535
///
36+
/// This will work for any function where &self is in scope and that returns `Result<T, E>`, `Result<(), E>`, or `T`, where `T: Default`.
37+
/// `path` needs to point at a `&PgTPath``.
3638
///
37-
/// Usage:
38-
/// ```
39+
/// ### Usage
40+
///
41+
/// ```ignore
3942
/// impl WorkspaceServer {
4043
/// #[ignore_path(path=&params.path)]
4144
/// fn foo(&self, params: FooParams) -> Result<FooResult, WorkspaceError> {
@@ -54,8 +57,6 @@ impl syn::parse::Parse for IgnoredPath {
5457
/// }
5558
/// }
5659
/// ```
57-
///
58-
/// This will work for any function where &self is in scope and that returns `Result<T, E>`, `Result<(), E>`, or `T`, where `T: Default`.
5960
pub fn ignored_path(args: TokenStream, input: TokenStream) -> TokenStream {
6061
let ignored_path = parse_macro_input!(args as IgnoredPath);
6162
let input_fn = parse_macro_input!(input as syn::ItemFn);

0 commit comments

Comments
 (0)