branch: elpa/rust-mode
commit 8cd18cc89d1e1f4419fb7b6a13d6bf50e480938b
Merge: 54a9c3d 72f795d
Author: Felix S Klock II <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #293 from TristanCacqueray/master
    
    Add rust-run and rust-test interactive function
---
 rust-mode.el | 10 ++++++++++
 1 file changed, 10 insertions(+)

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)

Reply via email to