about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/glittershark/emacs.d/snippets/rust-mode/async test10
-rw-r--r--users/glittershark/emacs.d/snippets/rust-mode/benchmark10
2 files changed, 20 insertions, 0 deletions
diff --git a/users/glittershark/emacs.d/snippets/rust-mode/async test b/users/glittershark/emacs.d/snippets/rust-mode/async test
new file mode 100644
index 0000000000..b48e443cb8
--- /dev/null
+++ b/users/glittershark/emacs.d/snippets/rust-mode/async test
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# name: async test
+# uuid:
+# key: atest
+# condition: t
+# --
+#[tokio::test(threaded_scheduler)]
+async fn ${1:test_name}() {
+   `%`$0
+}
\ No newline at end of file
diff --git a/users/glittershark/emacs.d/snippets/rust-mode/benchmark b/users/glittershark/emacs.d/snippets/rust-mode/benchmark
new file mode 100644
index 0000000000..f1446923a0
--- /dev/null
+++ b/users/glittershark/emacs.d/snippets/rust-mode/benchmark
@@ -0,0 +1,10 @@
+# -*- mode: snippet -*-
+# name: benchmark
+# uuid:
+# key: bench
+# condition: t
+# --
+#[bench]
+fn ${1:benchmark_name}(b: &mut Bencher) {
+   `%`b.iter(|| $0);
+}
\ No newline at end of file