Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting: treat key as a shortcut for key:true #2084

Open
MaxVerevkin opened this issue Sep 7, 2024 · 2 comments
Open

Formatting: treat key as a shortcut for key:true #2084

MaxVerevkin opened this issue Sep 7, 2024 · 2 comments

Comments

@MaxVerevkin
Copy link
Collaborator

For example .dur(hms) instead of .dur(hms:true).

@bim9262
Copy link
Collaborator

bim9262 commented Sep 7, 2024

I like the idea, but I think we'd want to only do that, if the parameter is a boolean. Otherwise we'd get odd errors for args like arg_takes_number, arg_takes_string

@MaxVerevkin
Copy link
Collaborator Author

Funny thing is that the comments in parse.rs suggest this was the intention all along

// `.str(width:2)`
// `.eng(unit:bits,bin)`
fn parse_formatter(i: &str) -> IResult<&str, Formatter, PError> {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants