summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorFelix S Klock II <pnkfelix@pnkfx.org>2019-03-01 13:03:34 +0100
committerGitHub <noreply@github.com>2019-03-01 13:03:34 +0100
commit8cd18cc89d1e1f4419fb7b6a13d6bf50e480938b (patch)
tree5b8c6652afd85cac8aa8fd02025842fb7b919c14 /rust-mode.el
parent54a9c3d3f501620cdf3f2d86f239571c1cc87fc6 (diff)
parent72f795da4ce911939e4156964bc8be5f159d00ab (diff)
downloadrust-mode-8cd18cc89d1e1f4419fb7b6a13d6bf50e480938b.tar.gz
Merge pull request #293 from TristanCacqueray/master
Add rust-run and rust-test interactive function
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/rust-mode.el b/rust-mode.el
index a433d8d..c22cad8 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -1511,6 +1511,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)