summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Andresen <bandresen@gmail.com>2016-08-01 19:49:44 +0200
committerBenjamin Andresen <bandresen@gmail.com>2016-08-01 19:50:56 +0200
commite6971ff7fda4eae897cc3e5944414b8eb8f26196 (patch)
treecf5aac0940221aa70c12cc5092332f0b2d3207e4
parenta343f3cd536d010c564f1153a879330b64b8d221 (diff)
rust-mode: bug fix, consistency clean up + spawn
-rw-r--r--rust-mode/closure2
-rw-r--r--rust-mode/deny!2
-rw-r--r--rust-mode/println2
-rw-r--r--rust-mode/spawn7
-rw-r--r--rust-mode/test2
-rw-r--r--rust-mode/testmod4
-rw-r--r--rust-mode/whilel4
7 files changed, 15 insertions, 8 deletions
diff --git a/rust-mode/closure b/rust-mode/closure
index 8257983..89c2d01 100644
--- a/rust-mode/closure
+++ b/rust-mode/closure
@@ -4,4 +4,4 @@
# --
|${1:arguments}| {
$0
-} \ No newline at end of file
+}
diff --git a/rust-mode/deny! b/rust-mode/deny!
index 232dfbc..c4c85c5 100644
--- a/rust-mode/deny!
+++ b/rust-mode/deny!
@@ -2,4 +2,4 @@
# name: #![deny(lint)]
# key: deny!
# --
-#![deny(${1:lint})] \ No newline at end of file
+#![deny(${1:lint})]
diff --git a/rust-mode/println b/rust-mode/println
index 3cf802c..23bfe7c 100644
--- a/rust-mode/println
+++ b/rust-mode/println
@@ -2,4 +2,4 @@
# name: println!("{}", value);
# key: println
# --
-println!("${1:{}}", ${2}); \ No newline at end of file
+println!("${1:{}}", $2);
diff --git a/rust-mode/spawn b/rust-mode/spawn
new file mode 100644
index 0000000..6ed5c5e
--- /dev/null
+++ b/rust-mode/spawn
@@ -0,0 +1,7 @@
+# -*- mode: snippet -*-
+# name: spawn(proc() { ... });
+# key: spawn
+# --
+spawn(proc() {
+ $0
+});
diff --git a/rust-mode/test b/rust-mode/test
index e0d47be..5f4ab7f 100644
--- a/rust-mode/test
+++ b/rust-mode/test
@@ -4,5 +4,5 @@
# --
#[test]
fn ${1:test_name}() {
- ${2:()}
+ $0
}
diff --git a/rust-mode/testmod b/rust-mode/testmod
index 13e002f..8f6e112 100644
--- a/rust-mode/testmod
+++ b/rust-mode/testmod
@@ -8,6 +8,6 @@ mod tests {
#[test]
fn ${1:test_name}() {
- ${2:()}
+ $0
}
-} \ No newline at end of file
+}
diff --git a/rust-mode/whilel b/rust-mode/whilel
index 6e603a2..6cf9ac3 100644
--- a/rust-mode/whilel
+++ b/rust-mode/whilel
@@ -2,6 +2,6 @@
# name: while let pattern = expression { ... }
# key: whilel
# --
-while let ${1:pattern} = ${2:value} {
+while let ${1:pattern} = ${2:expression} {
$0
-} \ No newline at end of file
+}