Browse Source

Don't require descriptions

Samuel W. Flint 3 years ago
parent
commit
ea85797af0
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/main.rs

+ 4 - 1
src/main.rs

@@ -151,7 +151,10 @@ fn main() {
             match matches.subcommand_name() {
                 Some("create") => if let Some(matches) = matches.subcommand_matches("create") {
                     let name = matches.value_of("name").unwrap().to_string();
-                    let description = matches.value_of("description").unwrap().to_string();
+                    let description = match matches.value_of("description") {
+                        Some(thing) => thing.to_string(),
+                        None => "".to_string()
+                    };
                     let create = match matches.value_of("create") {
                         Some(thing) => thing.to_string(),
                         None => "".to_string()