From 696fd3a5f14305a2c2ff7fb4c8f6f3986b3211db Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Tue, 27 Sep 2016 23:13:17 -0700 Subject: [PATCH] Remove dependency on brev, bump version --- Cargo.toml | 5 +---- src/main.rs | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a4267095..096f2f6d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,7 @@ [package] name = "j" -version = "0.1.1" +version = "0.1.2" authors = ["Casey Rodarmor "] license = "WTFPL/MIT/Apache-2.0" description = "a command runner" homepage = "https://github.com/casey/j" - -[dependencies] -brev = "0.1.6" diff --git a/src/main.rs b/src/main.rs index 499378e4..2ecefb56 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,17 @@ -#[macro_use] -extern crate brev; +macro_rules! warn { + ($($arg:tt)*) => {{ + extern crate std; + use std::io::prelude::*; + let _ = writeln!(&mut std::io::stderr(), $($arg)*); + }}; +} +macro_rules! die { + ($($arg:tt)*) => {{ + extern crate std; + warn!($($arg)*); + std::process::exit(-1) + }}; +} #[derive(PartialEq, Clone, Copy)] enum Make {