Rust: pub fn, correct while trigger
This commit is contained in:
parent
814896e4d2
commit
af3c2d3f66
@ -18,6 +18,12 @@ fn ${1:function_name}(${2})${3/..*/ -> /}${3} {
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet pfn "A public function, optionally with arguments and return type."
|
||||
pub fn ${1:function_name}(${2})${3/..*/ -> /}${3} {
|
||||
${VISUAL}${0}
|
||||
}
|
||||
endsnippet
|
||||
|
||||
snippet arg "Function Arguments" i
|
||||
${1:a}: ${2:T}${3:, arg}
|
||||
endsnippet
|
||||
|
@ -7,6 +7,10 @@ snippet fn "Function definition"
|
||||
fn ${1:function_name}(${2})${3} {
|
||||
${0}
|
||||
}
|
||||
snippet pfn "Function definition"
|
||||
pub fn ${1:function_name}(${2})${3} {
|
||||
${0}
|
||||
}
|
||||
snippet test "Unit test function"
|
||||
#[test]
|
||||
fn ${1:test_function_name}() {
|
||||
@ -106,7 +110,7 @@ snippet loop "loop {}" b
|
||||
loop {
|
||||
${0}
|
||||
}
|
||||
snippet while "while loop"
|
||||
snippet wh "while loop"
|
||||
while ${1:condition} {
|
||||
${0}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user