From 72f795da4ce911939e4156964bc8be5f159d00ab Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Fri, 21 Dec 2018 04:01:09 +0000 Subject: Add rust-run and rust-test interactive function This change adds a couple of useful commands similar to the rust-build function. --- rust-mode.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/rust-mode.el b/rust-mode.el index a8af671..d2e9ff1 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -1502,6 +1502,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) -- cgit v1.2.3