chore: more cleaning
This commit is contained in:
10
src/main.rs
10
src/main.rs
@ -101,17 +101,17 @@ fn get_initial_model(file_path: &Option<PathBuf>) -> Result<Model> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Ok(Model::new("New Model"))
|
Ok(Model::new("New Model"))
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
let args: Vec<String> = std::env::args().collect();
|
let args: Vec<String> = std::env::args().collect();
|
||||||
let maybe_cmd_line_args = parse_args(args);
|
|
||||||
|
|
||||||
if maybe_cmd_line_args.is_none() {
|
let cmd_line_args = if let Some(args) = parse_args(args) {
|
||||||
|
args
|
||||||
|
} else {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
};
|
||||||
let cmd_line_args = maybe_cmd_line_args.unwrap();
|
|
||||||
|
|
||||||
// Load or create model
|
// Load or create model
|
||||||
let mut model = get_initial_model(&cmd_line_args.file_path)?;
|
let mut model = get_initial_model(&cmd_line_args.file_path)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user