Merge pull request #333 from r-darwish/rust

rust: make fns/pfns like the rest of the function templates (fix #323)
This commit is contained in:
Andrea Crotti 2019-08-21 10:01:07 +01:00 committed by GitHub
commit 71ae4a665f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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
}