rust: make fns/pfns like the rest of the function templates (fix #323)

This commit is contained in:
Roey Darwish Dror 2019-08-15 13:16:41 +03:00 committed by Spenser Truex
parent 4a889dc067
commit 8f4de7765e
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,7 @@
# -*- mode: snippet -*-
# name: fn name(&self) -> Type;
# name: fn name(&self) -> Type { ... }
# key: fns
# --
fn ${1:name}(${2:&self}) -> ${3:Type};
fn ${1:name}(${2:&self}) -> ${3:Type} {
$0
}

View File

@ -1,5 +1,7 @@
# -*- mode: snippet -*-
# name: pub fn name(&self) -> Type;
# name: pub fn name(&self) -> Type { ... }
# key: pfns
# --
pub fn ${1:name}(${2:&self}) -> ${3:Type};
pub fn ${1:name}(${2:&self}) -> ${3:Type} {
$0
}