Google: “How to use leading-zero-util?”
A couple things have happened since the last devlog, so let’s go through them!
Flatten
Until today, and we will get to why, all the code was in src/main.rs, which made it harder to deal with and harder to work with. I moved the Cli struct (the clap parser struct) to a new file, src/cli.rs, so it’s a little more readable now.
Man Down!
As I mentioned in my last devlog, I was going to use the clap_mangen crate to generate a man file for the leading-zero-util. I set it up and created a build.rs, but realised that crates.io wouldn’t do anything with the man files, so you can’t run man leading-zero-util. This was v0.4.0 (We are now on v0.5.0). The benefit of a man file is minuscule, and I can always add it back to my build.rs. It wasn’t worth the extra dependencies, so I dropped it.
Reading the version message explains the version message.
I was previously considering the clap-version-flag crate for a better version message, but realised it would add basically nothing, and it isn’t well maintained. I decided instead to use shadow-rs for a better long version. I had deleted my build.rs, so I made a new one and added shadow-rs to the code.
Comments 2
@water Thank you so much!!
Sign in to join the conversation.