Skip to content

Commit

Permalink
Merge pull request #10 from emacs-rustic/cargo-add-prefix
Browse files Browse the repository at this point in the history
syntax error in rustic-cargo-add with prefix argument
  • Loading branch information
CeleritasCelery authored May 19, 2024
2 parents 8368f17 + 7e54b04 commit a2ee3cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rustic-cargo.el
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,10 @@ The documentation is built if necessary."
"Add crate to Cargo.toml using 'cargo add'.
If running with prefix command `C-u', read whole command from minibuffer."
(interactive "P")
(let* ((command (if arg
(read-from-minibuffer "Cargo add command: "
(rustic-cargo-bin) " add ")
(concat (rustic-cargo-bin) " add "
(read-from-minibuffer "Crate: ")))))
(let* ((base (concat (rustic-cargo-bin) " add "))
(command (if arg
(read-from-minibuffer "Cargo add command: " base)
(concat base (read-from-minibuffer "Crate: ")))))
(rustic-run-cargo-command command)))

(defun rustic-cargo-add-missing-dependencies (&optional arg)
Expand Down

0 comments on commit a2ee3cf

Please sign in to comment.