refactor: rename project name from underline to dash
This commit is contained in:
34
wfassoc-exec/src/main.rs
Normal file
34
wfassoc-exec/src/main.rs
Normal file
@@ -0,0 +1,34 @@
|
||||
pub(crate) mod manifest;
|
||||
pub(crate) mod cli;
|
||||
pub(crate) mod runner;
|
||||
|
||||
use std::path::Path;
|
||||
use std::process;
|
||||
use thiserror::Error as TeError;
|
||||
|
||||
/// All errors occurs in this executable.
|
||||
#[derive(TeError, Debug)]
|
||||
enum Error {
|
||||
/// Error when parsing manifest TOML file.
|
||||
#[error("{0}")]
|
||||
Manifest(#[from] manifest::Error),
|
||||
}
|
||||
|
||||
/// Result type used in this executable.
|
||||
type Result<T> = std::result::Result<T, Error>;
|
||||
|
||||
fn runner() -> Result<()> {
|
||||
let raw_mf = manifest::RawManifest::from_file(Path::new(r#"D:\Repo\wfassoc\example\ppic.toml"#))?;
|
||||
//let mf = raw_mf.to_checked()?;
|
||||
println!("{:?}", raw_mf);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = cli::parse();
|
||||
|
||||
runner().unwrap_or_else(|e| {
|
||||
eprintln!("Runtime error: {}.", e);
|
||||
process::exit(1)
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user