Rust: remove semicolons from constructor returns
This commit is contained in:
parent
c2ffea6a91
commit
9f95287083
@ -88,7 +88,7 @@ pub struct ${1:`!p snip.rv = snip.basename.title() or "Name"`} {
|
|||||||
|
|
||||||
impl $1 {
|
impl $1 {
|
||||||
pub fn new(${2}) -> $1 {
|
pub fn new(${2}) -> $1 {
|
||||||
$1 { ${3} };
|
$1 { ${3} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
endsnippet
|
endsnippet
|
||||||
|
@ -25,7 +25,7 @@ snippet bench "Bench function" b
|
|||||||
}
|
}
|
||||||
snippet new "Constructor function"
|
snippet new "Constructor function"
|
||||||
pub fn new(${2}) -> ${1:Name} {
|
pub fn new(${2}) -> ${1:Name} {
|
||||||
$1 { ${3} };
|
$1 { ${3} }
|
||||||
}
|
}
|
||||||
snippet main "Main function"
|
snippet main "Main function"
|
||||||
pub fn main() {
|
pub fn main() {
|
||||||
@ -143,7 +143,7 @@ snippet stn "Struct with new constructor"
|
|||||||
|
|
||||||
impl $1 {
|
impl $1 {
|
||||||
pub fn new(${2}) -> $1 {
|
pub fn new(${2}) -> $1 {
|
||||||
$1 { ${3} };
|
$1 { ${3} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
snippet type "Type alias"
|
snippet type "Type alias"
|
||||||
|
Loading…
Reference in New Issue
Block a user