extern crate hammer;
extern crate serialize;
extern crate toml;
-extern crate semver;
use hammer::{FlagDecoder,FlagConfig,FlagConfiguration};
use serialize::{Decoder,Decodable};
use serialize::json::Encoder;
use toml::from_toml;
-use semver::Version;
use cargo::{Manifest,LibTarget,ExecTarget,Project};
use std::path::Path;
}
let b = bin.get_ref().map(|b_ref| {
- let mut b = b_ref.clone();
+ let b = b_ref.clone();
let mut path = b.path.clone();
if path.is_none() {
path = Some(format!("src/bin/{}.rs", b.name.clone()));
(~[LibTarget{ path: path.unwrap(), name: l.name }], ~[])
} else if bin.is_some() {
let b = bin.get_ref().map(|b_ref| {
- let mut b = b_ref.clone();
+ let b = b_ref.clone();
let mut path = b.path.clone();
if path.is_none() {
path = Some(format!("src/bin/{}.rs", b.name.clone()));
use std::io;
use std::io::process::Process;
use serialize::json;
-use serialize::{Decoder,Decodable};
+use serialize::Decodable;
use std::path::Path;
-use cargo::{Manifest,LibTarget,ExecTarget,Project};
+use cargo::Manifest;
/**
cargo-rustc -- ...args
~"--crate-type", ~"lib"
];
- io::fs::mkdir_recursive(&root.join("target"), io::UserRWX);
+ match io::fs::mkdir_recursive(&root.join("target"), io::UserRWX) {
+ Err(_) => fail!("Couldn't mkdir -p"),
+ Ok(val) => val
+ }
println!("Executing {}", args);
extern crate getopts;
use std::os::{args,set_exit_status};
-use std::io::process::Process;
-use getopts::{reqopt,getopts,OptGroup};
+use getopts::{reqopt,getopts};
/**
cargo-verify-project --manifest=LOCATION
let matches = match getopts(arguments.tail(), opts) {
Ok(m) => m,
- Err(err) => {
+ Err(_) => {
fail("missing-argument", "manifest");
return;
}
return;
}
- let root = match toml::parse_from_file(file.as_str().unwrap()) {
- Err(e) => {
+ match toml::parse_from_file(file.as_str().unwrap()) {
+ Err(_) => {
fail("invalid", "invalid-format");
return;
},