feat(gs/emacs): Add new snippets for rust-mode

Add snippets for async tests and benchmarks

Change-Id: Ic1ad46c7f76b1e68c4043a13e821583195c661ab
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2353
Tested-by: BuildkiteCI
Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
Griffin Smith 2021-01-13 10:06:40 -05:00 committed by glittershark
parent b4e420d4ff
commit 5e30c3fe1b
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: async test
# uuid:
# key: atest
# condition: t
# --
#[tokio::test(threaded_scheduler)]
async fn ${1:test_name}() {
`%`$0
}

View file

@ -0,0 +1,10 @@
# -*- mode: snippet -*-
# name: benchmark
# uuid:
# key: bench
# condition: t
# --
#[bench]
fn ${1:benchmark_name}(b: &mut Bencher) {
`%`b.iter(|| $0);
}