From a85f33cf98d8f0c773eed0f05a39a0e35813acac Mon Sep 17 00:00:00 2001 From: sharkdp Date: Fri, 3 Apr 2020 21:35:09 +0200 Subject: [PATCH] Clean up build.rs --- build.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.rs b/build.rs index f3787c4..735ad74 100644 --- a/build.rs +++ b/build.rs @@ -1,18 +1,18 @@ use std::fs; -use std::io::{self, Write}; -use std::process::exit; use clap::Shell; include!("src/app.rs"); fn main() { - match version_check::is_min_version("1.36") { + let min_version = "1.36"; + + match version_check::is_min_version(min_version) { Some(true) => {} // rustc version too small or can't figure it out _ => { - writeln!(&mut io::stderr(), "'fd' requires rustc >= 1.36").unwrap(); - exit(1); + eprintln!("'fd' requires rustc >= {}", min_version); + std::process::exit(1); } }