cleanup implementing fern
This commit is contained in:
parent
ad1fab1aa2
commit
f80d2a9c1d
@ -1,4 +1,4 @@
|
|||||||
use std::{fs::File, io::Read, path::{Path, PathBuf}, u8};
|
use std::{fs::File, io::Read, path::Path, u8};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use crate::config::{args::Args, engine::Engine};
|
use crate::config::{args::Args, engine::Engine};
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,7 @@ use clap::Parser;
|
|||||||
|
|
||||||
pub fn get_config() -> Option<Config> {
|
pub fn get_config() -> Option<Config> {
|
||||||
let args = Args::try_parse().or_else(|err|{
|
let args = Args::try_parse().or_else(|err|{
|
||||||
if ! err.use_stderr() {
|
if err.use_stderr() {
|
||||||
println!("{}", err);
|
println!("{}", err);
|
||||||
return Err(())
|
return Err(())
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
|
|
||||||
use crate::config::get_config;
|
use crate::config::get_config;
|
||||||
|
use log::trace;
|
||||||
|
|
||||||
mod chess;
|
mod chess;
|
||||||
mod config;
|
mod config;
|
||||||
@ -14,9 +15,6 @@ mod logging;
|
|||||||
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let config = get_config();
|
let config = get_config().unwrap();
|
||||||
if config.is_none() {
|
trace!("{:?}", config);
|
||||||
return
|
|
||||||
}
|
|
||||||
println!("2");
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user