We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9dd6943 commit a833aebCopy full SHA for a833aeb
libs/gl-cli/src/main.rs
@@ -57,10 +57,10 @@ async fn run(cli: Cli) -> Result<()> {
57
env_logger::init();
58
}
59
60
- let data_dir = match cli.data_dir {
61
- Some(d) => util::DataDir(PathBuf::from_str(&d).unwrap()),
62
- None => util::DataDir::default(),
63
- };
+ let data_dir = cli
+ .data_dir
+ .map(|d| util::DataDir(PathBuf::from_str(&d).expect("is not a valid path")))
+ .unwrap_or_default();
64
65
Ok(match cli.cmd {
66
Commands::Scheduler(cmd) => {
0 commit comments