mirror of
https://github.com/tauri-apps/tauri-vscode.git
synced 2026-01-31 00:35:18 +01:00
feat: default values
This commit is contained in:
@@ -6,10 +6,10 @@
|
||||
],
|
||||
"body": [
|
||||
"---",
|
||||
"\"$1\": \"$2\"",
|
||||
"\"${3:$WORKSPACE_NAME}\": \"${1|patch,minor,major|}\"",
|
||||
"---",
|
||||
"",
|
||||
"$3"
|
||||
"$2"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
],
|
||||
"body": [
|
||||
"#[tauri::command]",
|
||||
"async fn $1<R: Runtime>(app: tauri::AppHandle<R>, window: tauri::Window<R>) -> Result<(), String> {",
|
||||
"async fn ${1:command_name}<R: Runtime>(app: tauri::AppHandle<R>, window: tauri::Window<R>) -> Result<(), String> {",
|
||||
" Ok(())",
|
||||
"}"
|
||||
],
|
||||
@@ -27,7 +27,7 @@
|
||||
"}",
|
||||
"// remember to call `.manage(MyState::default())`",
|
||||
"#[tauri::command]",
|
||||
"async fn $1(state: tauri::State<'_, MyState>) -> Result<(), String> {",
|
||||
"async fn ${1:command_name}(state: tauri::State<'_, MyState>) -> Result<(), String> {",
|
||||
" *state.s.lock().unwrap() = \"new string\".into();",
|
||||
" state.t.lock().unwrap().insert(\"key\".into(), \"value\".into());",
|
||||
" Ok(())",
|
||||
|
||||
Reference in New Issue
Block a user