Removed 'Rust' text from test; Silenced missing rustc warning

pull/22/head
Daniel Kolsoi 6 years ago
parent 5fd171c334
commit 9b0e0c786a

@ -1104,7 +1104,7 @@ prompt_root_indicator() {
# Print Rust version number # Print Rust version number
prompt_rust_version() { prompt_rust_version() {
local rust_version local rust_version
rust_version=$(command rustc --version 2>&1) rust_version=$(command rustc --version 2>/dev/null)
# Remove "rustc " (including the whitespace) from the beginning # Remove "rustc " (including the whitespace) from the beginning
# of the version string and remove everything after the next # of the version string and remove everything after the next
# whitespace. This way we'll end up with only the version. # whitespace. This way we'll end up with only the version.

@ -19,7 +19,7 @@ function testRust() {
alias rustc=mockRust alias rustc=mockRust
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version) POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(rust_version)
assertEquals "%K{208} %F{black}Rust 0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)" assertEquals "%K{208} %F{black}0.4.1a-alpha %k%F{208}%f " "$(build_left_prompt)"
unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS unset POWERLEVEL9K_LEFT_PROMPT_ELEMENTS
unalias rustc unalias rustc

Loading…
Cancel
Save