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:
		
							parent
							
								
									b4e420d4ff
								
							
						
					
					
						commit
						5e30c3fe1b
					
				
					 2 changed files with 20 additions and 0 deletions
				
			
		
							
								
								
									
										10
									
								
								users/glittershark/emacs.d/snippets/rust-mode/async test
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								users/glittershark/emacs.d/snippets/rust-mode/async test
									
										
									
									
									
										Normal 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 | ||||
| } | ||||
							
								
								
									
										10
									
								
								users/glittershark/emacs.d/snippets/rust-mode/benchmark
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								users/glittershark/emacs.d/snippets/rust-mode/benchmark
									
										
									
									
									
										Normal 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); | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue