Use path clarity
This commit is contained in:
parent
91f4d49a47
commit
dc9bf793bb
16
src/main.rs
16
src/main.rs
|
@ -5,20 +5,14 @@
|
|||
|
||||
#[macro_use]
|
||||
extern crate pest_derive;
|
||||
#[macro_use]
|
||||
extern crate clap;
|
||||
|
||||
extern crate colored;
|
||||
extern crate indexmap;
|
||||
extern crate pest;
|
||||
|
||||
pub mod parsers;
|
||||
mod parsers;
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::fs;
|
||||
use std::process;
|
||||
|
||||
use clap::{App, Arg};
|
||||
use clap::{crate_version, App, Arg};
|
||||
use colored::Colorize;
|
||||
|
||||
use crate::parsers::slice;
|
||||
|
@ -39,7 +33,8 @@ fn main() {
|
|||
.short("c")
|
||||
.takes_value(true)
|
||||
.value_name("FILE"),
|
||||
).arg(
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("profile")
|
||||
.help("The profile used to fill the template")
|
||||
.long("profile")
|
||||
|
@ -47,7 +42,8 @@ fn main() {
|
|||
.short("p")
|
||||
.takes_value(true)
|
||||
.value_name("FILE"),
|
||||
).get_matches();
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
// We can unwrap because config is required.
|
||||
let config_file = matches.value_of("config").unwrap();
|
||||
|
|
|
@ -65,7 +65,8 @@ fn parse_from_string() {
|
|||
let conf = "
|
||||
Author.name = eriol
|
||||
Author.like = rust, python
|
||||
".to_string();
|
||||
"
|
||||
.to_string();
|
||||
|
||||
let c = parse(&conf).unwrap();
|
||||
|
||||
|
@ -79,7 +80,8 @@ fn update() {
|
|||
Author.name = eriol
|
||||
Author.like = rust, python
|
||||
Author.web = example.org
|
||||
".to_string();
|
||||
"
|
||||
.to_string();
|
||||
|
||||
let mut m = BTreeMap::new();
|
||||
m.insert("Author.like".to_string(), "rust, python, c++".to_string());
|
||||
|
|
Loading…
Reference in New Issue