Skip to content

Commit 281e390

Browse files
authored
chore(guides): remove unnecessary anonymous lifetimes (tauri-apps#217)
1 parent e75a7b3 commit 281e390

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docs/en/usage/guides/command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ The state can be accessed on a command using `tauri::State`:
146146
struct MyState(String);
147147

148148
#[tauri::command]
149-
fn my_custom_command(state: tauri::State<'_, MyState>) {
149+
fn my_custom_command(state: tauri::State<MyState>) {
150150
assert_eq!(state.0 == "some state value", true);
151151
}
152152

docs/en/usage/guides/visual/splashscreen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ struct MainWindow(Arc<Mutex<Window>>);
4545

4646
#[tauri::command]
4747
fn close_splashscreen(
48-
splashscreen: State<'_, SplashscreenWindow>,
49-
main: State<'_, MainWindow>,
48+
splashscreen: State<SplashscreenWindow>,
49+
main: State<MainWindow>,
5050
) {
5151
// Close splashscreen
5252
splashscreen.0.lock().unwrap().close().unwrap();

docs/fr/usage/guides/command.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The state can be accessed on a command using `tauri::State`:
139139
struct MyState(String);
140140

141141
#[tauri::command]
142-
fn my_custom_command(state: tauri::State<'_, MyState>) {
142+
fn my_custom_command(state: tauri::State<MyState>) {
143143
assert_eq!(state.0 == "some state value", true);
144144
}
145145

docs/fr/usage/guides/visual/splashscreen.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ struct MainWindow(Arc<Mutex<Window>>);
4545

4646
#[tauri::command]
4747
fn close_splashscreen(
48-
splashscreen: State<'_, SplashscreenWindow>,
49-
main: State<'_, MainWindow>,
48+
splashscreen: State<SplashscreenWindow>,
49+
main: State<MainWindow>,
5050
) {
5151
// Close splashscreen
5252
splashscreen.0.lock().unwrap().close().unwrap();

0 commit comments

Comments
 (0)