diff options
| author | Tristan Cacqueray <tdecacqu@redhat.com> | 2018-12-21 04:01:09 +0000 |
|---|---|---|
| committer | Tristan Cacqueray <tdecacqu@redhat.com> | 2018-12-21 04:01:09 +0000 |
| commit | 72f795da4ce911939e4156964bc8be5f159d00ab (patch) | |
| tree | edbf38a178510e411c6da47b5fd9750072fa02a6 | |
| parent | d3a70256fe560bcc463ed42e4259e9fce0fdfee3 (diff) | |
| download | rust-mode-72f795da4ce911939e4156964bc8be5f159d00ab.tar.gz | |
Add rust-run and rust-test interactive function
This change adds a couple of useful commands similar to the
rust-build function.
| -rw-r--r-- | rust-mode.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el index a8af671..d2e9ff1 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -1502,6 +1502,16 @@ This is written mainly to be used as `end-of-defun-function' for Rust." (interactive) (compile "cargo build")) +(defun rust-run () + "Run using `cargo run`" + (interactive) + (compile "cargo run")) + +(defun rust-test () + "Test using `cargo test`" + (interactive) + (compile "cargo test")) + (defvar rust-mode-map (let ((map (make-sparse-keymap))) (define-key map (kbd "C-c C-f") 'rust-format-buffer) |
