Strip mostly vestigial --verbose flag

This commit is contained in:
Lucien Greathouse 2018-04-12 22:37:36 -07:00
parent 844b20e7fc
commit e9bc66e5e3
3 changed files with 3 additions and 15 deletions

View file

@ -24,14 +24,8 @@ fn main() {
(@arg port: --port +takes_value "The port to listen on. Defaults to 8000.")
)
(@arg verbose: --verbose "Enable extended logging.")
).get_matches();
let verbose = match matches.occurrences_of("verbose") {
0 => false,
_ => true,
};
match matches.subcommand() {
("init", sub_matches) => {
let sub_matches = sub_matches.unwrap();
@ -61,7 +55,7 @@ fn main() {
}
};
rojo_core::commands::serve(&project_path, verbose, port);
rojo_core::commands::serve(&project_path, port);
},
_ => {
eprintln!("Please specify a subcommand!");

View file

@ -4,16 +4,12 @@ use std::time::Instant;
use rand;
use project::{Project, ProjectLoadError};
use project::Project;
use web;
pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) {
pub fn serve(project_path: &PathBuf, port: Option<u64>) {
let server_id = rand::random::<u64>();
if verbose {
println!("Attempting to locate project at {}...", project_path.display());
}
let project = match Project::load(project_path) {
Ok(v) => {
println!("Using project from {}", project_path.display());
@ -26,7 +22,6 @@ pub fn serve(project_path: &PathBuf, verbose: bool, port: Option<u64>) {
};
let web_config = web::WebConfig {
verbose,
port: port.unwrap_or(project.serve_port),
server_id,
};

View file

@ -8,7 +8,6 @@ use web_util::json_response;
/// The set of configuration the web server needs to start.
pub struct WebConfig {
pub port: u64,
pub verbose: bool,
pub server_id: u64,
}