Skip to content

Commit

Permalink
Merge pull request #35 from bryceberger/master
Browse files Browse the repository at this point in the history
Add args_override_self
  • Loading branch information
solidiquis authored Mar 5, 2023
2 parents 6550bfe + 5ee50ac commit d832a41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::process::ExitCode;

use clap::Parser;
use clap::{CommandFactory, FromArgMatches};
use cli::Clargs;
use fs::erdtree::{self, tree::Tree};

Expand All @@ -25,9 +25,10 @@ fn main() -> ExitCode {
ExitCode::SUCCESS
}

fn run() -> Result<(), fs::error::Error> {
fn run() -> Result<(), Box<dyn std::error::Error>> {
erdtree::tree::ui::init();
let clargs = Clargs::parse();
let matches = Clargs::command().args_override_self(true).get_matches();
let clargs = Clargs::from_arg_matches(&matches)?;
let tree = Tree::try_from(clargs)?;

println!("{tree}");
Expand Down

0 comments on commit d832a41

Please sign in to comment.