feat: default values

This commit is contained in:
Lucas Nogueira
2021-09-29 10:07:28 -03:00
parent f610cebcd5
commit da74685c99
2 changed files with 4 additions and 4 deletions

View File

@@ -6,10 +6,10 @@
],
"body": [
"---",
"\"$1\": \"$2\"",
"\"${3:$WORKSPACE_NAME}\": \"${1|patch,minor,major|}\"",
"---",
"",
"$3"
"$2"
]
}
}

View File

@@ -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(())",