Skip to content

Commit 8cd18cc

Browse files
authored
Merge pull request #293 from TristanCacqueray/master
Add rust-run and rust-test interactive function
2 parents 54a9c3d + 72f795d commit 8cd18cc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rust-mode.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1511,6 +1511,16 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
15111511
(interactive)
15121512
(compile "cargo build"))
15131513

1514+
(defun rust-run ()
1515+
"Run using `cargo run`"
1516+
(interactive)
1517+
(compile "cargo run"))
1518+
1519+
(defun rust-test ()
1520+
"Test using `cargo test`"
1521+
(interactive)
1522+
(compile "cargo test"))
1523+
15141524
(defvar rust-mode-map
15151525
(let ((map (make-sparse-keymap)))
15161526
(define-key map (kbd "C-c C-f") 'rust-format-buffer)

0 commit comments

Comments
 (0)