mirror of
https://github.com/moghtech/komodo.git
synced 2025-12-20 03:19:58 -06:00
25 lines
471 B
Plaintext
25 lines
471 B
Plaintext
{
|
|
"resolve": {
|
|
"scope": "rust",
|
|
"prefix": "resolve",
|
|
"body": [
|
|
"impl Resolve<${1}, User> for State {",
|
|
"\tasync fn resolve(&self, ${1} { ${0} }: ${1}, _: User) -> anyhow::Result<${2}> {",
|
|
"\t\ttodo!()",
|
|
"\t}",
|
|
"}"
|
|
]
|
|
},
|
|
"static": {
|
|
"scope": "rust",
|
|
"prefix": "static",
|
|
"body": [
|
|
"fn ${1}() -> &'static ${2} {",
|
|
"\tstatic ${3}: OnceLock<${2}> = OnceLock::new();",
|
|
"\t${3}.get_or_init(|| {",
|
|
"\t\t${0}",
|
|
"\t})",
|
|
"}"
|
|
]
|
|
}
|
|
} |