fix typo in state.rs (#4699)

This commit is contained in:
Jonas Kruckenberg
2022-07-25 16:54:10 +02:00
committed by GitHub
parent fd4c851ee9
commit c7fec3e1ff
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
"tauri": patch
---
Fix typo in invalid state access panic message.

View File

@@ -47,7 +47,7 @@ impl<'r, 'de: 'r, T: Send + Sync + 'static, R: Runtime> CommandArg<'de, R> for S
fn from_command(command: CommandItem<'de, R>) -> Result<Self, InvokeError> {
Ok(command.message.state_ref().try_get().unwrap_or_else(|| {
panic!(
"state not managed for field `{}` on command `{}`. You muse call `.manage()` before using this command",
"state not managed for field `{}` on command `{}`. You must call `.manage()` before using this command",
command.key, command.name
)
}))