Refactor various install_*_global_packages functions

This commit is contained in:
2019-12-27 22:37:03 +00:00
parent e7ef71b49a
commit 1aefb225bc
3 changed files with 48 additions and 39 deletions

View File

@@ -8,9 +8,12 @@ if [ -d "$HOME/.cargo/bin" ]; then
fi
install_rust_global_packages() {
rustup component add \
rls \
rust-analysis \
rust-src \
rustfmt \
local packages=(
rls
rust-analysis
rust-src
rustfmt
)
rustup component add "${packages[@]}"
}