summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-15 21:50:45 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2019-01-15 21:50:45 +0000
commit2aac00047f77c937c80d85ca55e561eead614c43 (patch)
treeb1be3269bce191607e2879d2dc1e55e2e572c6ab
parentf14c562e3f007212883ce287cec4d29218ebbe05 (diff)
downloadrsyarn-2aac00047f77c937c80d85ca55e561eead614c43.tar.bz2
Update for no need to extern crate
-rw-r--r--src/cli.rs4
-rw-r--r--src/err.rs2
-rw-r--r--src/main.rs19
-rw-r--r--src/yarn.rs2
4 files changed, 8 insertions, 19 deletions
diff --git a/src/cli.rs b/src/cli.rs
index 37ca30f..f8b5c54 100644
--- a/src/cli.rs
+++ b/src/cli.rs
@@ -1,10 +1,12 @@
use std::ffi::{OsStr, OsString};
use std::path::Path;
-use clap::{App, AppSettings, Arg, Shell};
+use clap::{crate_version, App, AppSettings, Arg, Shell};
use regex::Regex;
+use lazy_static::*;
+
// Validators
fn is_number(v: String) -> Result<(), String> {
diff --git a/src/err.rs b/src/err.rs
index 0ff94cf..8734561 100644
--- a/src/err.rs
+++ b/src/err.rs
@@ -4,6 +4,8 @@ use regex;
use std::env;
use std::io;
+use quick_error::quick_error;
+
quick_error! {
#[derive(Debug)]
pub enum YarnError {
diff --git a/src/main.rs b/src/main.rs
index 314709d..0881be8 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,21 +1,3 @@
-#[macro_use]
-extern crate clap;
-#[macro_use]
-extern crate lazy_static;
-#[macro_use]
-extern crate quick_error;
-
-extern crate pbr;
-
-extern crate pulldown_cmark;
-extern crate regex;
-
-extern crate mktemp;
-
-extern crate termion;
-
-extern crate crossbeam;
-
use std::fs;
use std::io;
use std::io::Write;
@@ -25,6 +7,7 @@ use std::time::Instant;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
+use lazy_static::*;
use regex::Regex;
mod cli;
diff --git a/src/yarn.rs b/src/yarn.rs
index c73707c..5710cba 100644
--- a/src/yarn.rs
+++ b/src/yarn.rs
@@ -14,6 +14,8 @@ use regex::Regex;
use crate::opt::YarnArgs;
+use lazy_static::*;
+
lazy_static! {
static ref SCENARIO_RE: Regex = Regex::new("^SCENARIO +(.+)$").unwrap();
static ref ASSUMING_RE: Regex = Regex::new("^ASSUMING +(.+)$").unwrap();