Last active
September 11, 2017 23:25
-
-
Save rschulman/f779e5299771b0bbc102edae9b60853c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
named!(command<&str, Command>, do_parse!( | |
todo() >> | |
c: todo_text() >> | |
d: deadline() >> | |
s: scheduled() >> | |
(Command::TodoCmd { | |
body: c.to_string(), | |
deadline: if d == "" { None } else { Some(d.to_string()) }, | |
scheduled: if s == "" { None } else { Some(s.to_string()) } | |
}) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment