From eb9b5c5a855ae5c17b0d2d2d6c16deb2f07b70cb Mon Sep 17 00:00:00 2001 From: PhnxRbrn Date: Tue, 24 Nov 2015 13:14:49 -0500 Subject: [PATCH] Refactor and Update to 1.0.0 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 8 ++++---- src/util/mod.rs | 16 ++++++++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a9691aa..e49cf49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "file_compare" -version = "0.1.0" +version = "1.0.0" dependencies = [ "clap 1.4.7 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/Cargo.toml b/Cargo.toml index 4d68c86..1624d42 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "file_compare" -version = "0.1.0" +version = "1.0.0" authors = ["Chris Palmer "] license = "GPL-3.0" description = "compare two files to see if lines in first file exist in the second file" diff --git a/src/main.rs b/src/main.rs index 83fc75b..8054d1a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,10 +8,10 @@ extern crate clap; use clap::{Arg, App}; fn main() { - let matches = App::new("file_compare") - .version("0.1.0") - .author("Chris Palmer ") - .about("compare two files to see if lines in first file exist in the second file") + let matches = App::new(util::get_name()) + .version(util::get_version()) + .author(util::get_author()) + .about(util::get_about()) .arg(Arg::with_name("INPUT") .help("Sets the input file to use to check") .required(true) diff --git a/src/util/mod.rs b/src/util/mod.rs index 324ff57..80f5386 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -18,3 +18,19 @@ pub fn read_to_vec(path_str: &str) -> Vec { file_vec } + +pub fn get_version() -> &'static str { + "1.0.0" +} + +pub fn get_name() -> &'static str { + "file_compare" +} + +pub fn get_author() -> &'static str { + "Chris Palmer " +} + +pub fn get_about() -> &'static str { + "compare two files to see if lines in first file exist in the second file" +}