fix(typo): correct typo in error message for transport cancellation and field. (#404)

* fix(worker): correct typo in error message for transport cancellation

Signed-off-by: Jose Bovet Derpich <jose.bovet@gmail.com>

* doc(typo): correct typo in field header for tool and tool_router usage sections

Signed-off-by: Jose Bovet Derpich <jose.bovet@gmail.com>

---------

Signed-off-by: Jose Bovet Derpich <jose.bovet@gmail.com>
This commit is contained in:
Jose Bovet Derpich 2025-08-31 15:14:14 -04:00 • committed by GitHub
commit 7bd45ec6a5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -18,7 +18,7 @@ This will generate a function that return the attribute of this tool, with type
#### Usage
| feied | type | usage |
| field | type | usage |
| :- | :- | :- |
| `name` | `String` | The name of the tool. If not provided, it defaults to the function name. |
| `description` | `String` | A description of the tool. The document of this function will be used. |
@ -44,7 +44,7 @@ In most case, you need to add a field for handler to store the router informatio
#### Usage
| feied | type | usage |
| field | type | usage |
| :- | :- | :- |
| `router` | `Ident` | The name of the router function to be generated. Defaults to `tool_router`. |
| `vis` | `Visibility` | The visibility of the generated router function. Defaults to empty. |

View file

@ -16,7 +16,7 @@ mod tool_router;
///
/// ## Usage
///
/// | feied | type | usage |
/// | field | type | usage |
/// | :- | :- | :- |
/// | `name` | `String` | The name of the tool. If not provided, it defaults to the function name. |
/// | `description` | `String` | A description of the tool. The document of this function will be used. |
@ -47,7 +47,7 @@ pub fn tool(attr: TokenStream, input: TokenStream) -> TokenStream {
/// In most case, you need to add a field for handler to store the router information and initialize it when creating handler, or store it with a static variable.
/// ## Usage
///
/// | feied | type | usage |
/// | field | type | usage |
/// | :- | :- | :- |
/// | `router` | `Ident` | The name of the router function to be generated. Defaults to `tool_router`. |
/// | `vis` | `Visibility` | The visibility of the generated router function. Defaults to empty. |

View file

@ -15,7 +15,7 @@ pub enum WorkerQuitReason<E> {
error: E,
context: Cow<'static, str>,
},
#[error("Transport canncelled")]
#[error("Transport cancelled")]
Cancelled,
#[error("Transport closed")]
TransportClosed,