summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)