feat(rust/async-dyn-dispatch): Snippets for async Rust functions (#471)

* adding snippets for rust async functions and dynamic dispatch with Box<dyn T>
* remove box-dyn snippet
---------
Co-authored-by: Renan Vieira <2496686+renanvieira@users.noreply.github.com>
This commit is contained in:
Renan Chagas 2024-07-08 05:30:10 +02:00 committed by GitHub
parent 682157939e
commit 2c0e75ab5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -397,5 +397,23 @@
"prefix": "while",
"body": ["while ${1:condition} {", " ${2:todo!();}", "}"],
"description": "while … { … }"
},
"pafn": {
"prefix": "pafn",
"body": [
"pub async fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
" ${5:todo!();}",
"}"
],
"description": "pub async fn …(…) { … }"
},
"afn": {
"prefix": "afn",
"body": [
"async fn ${1:name}(${2:arg}: ${3:Type}) -> ${4:RetType} {",
" ${5:todo!();}",
"}"
],
"description": "async fn …(…) { … }"
}
}