Skip to content

Commit 72f795d

Browse files
Add rust-run and rust-test interactive function
This change adds a couple of useful commands similar to the rust-build function.
1 parent d3a7025 commit 72f795d

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
@@ -1502,6 +1502,16 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
15021502
(interactive)
15031503
(compile "cargo build"))
15041504

1505+
(defun rust-run ()
1506+
"Run using `cargo run`"
1507+
(interactive)
1508+
(compile "cargo run"))
1509+
1510+
(defun rust-test ()
1511+
"Test using `cargo test`"
1512+
(interactive)
1513+
(compile "cargo test"))
1514+
15051515
(defvar rust-mode-map
15061516
(let ((map (make-sparse-keymap)))
15071517
(define-key map (kbd "C-c C-f") 'rust-format-buffer)

0 commit comments

Comments
 (0)