10808: fix: show custom check-command r=Veykril a=Florian-Schoenherr

just realized this is a lot cleaner and actually shows something on a custom command,
also debugged it this time.

Co-authored-by: Florian-Schoenherr <65456722+Florian-Schoenherr@users.noreply.github.com>
This commit is contained in:
bors[bot] 2021-11-19 15:35:09 +00:00 committed by GitHub
commit cf2ddb935e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -407,16 +407,7 @@ impl GlobalState {
// the title, or the editor complains. Note that this is a user-facing string.
let title = if self.flycheck.len() == 1 {
match self.config.flycheck() {
Some(flycheck::FlycheckConfig::CargoCommand {
command,
..
}) => {
format!("cargo {}", command)
}
Some(flycheck::FlycheckConfig::CustomCommand {
command,
..
}) => command,
Some(config) => format!("{}", config),
None => "cargo check".to_string(),
}
} else {