Source code
Revision control
Copy as Markdown
Other Tools
if ! rustup component add rustfmt; then
TARGET=$(rustc -Vv | awk '/host/{print $2}')
NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/rustfmt")
tar -xJf - --strip-components=3 -C ~/.cargo/bin
rm -rf ~/.cargo/bin/doc
fi
if ! rustup component add clippy; then
TARGET=$(rustc -Vv | awk '/host/{print $2}')
NIGHTLY=$(curl -s "https://rust-lang.github.io/rustup-components-history/${TARGET}/clippy")
rustup default nightly-${NIGHTLY}
rustup component add rustfmt
rustup component add clippy
fi