This improves code readability quite a bit, while also adding a layer of
safety because we're checking the state byte against the enum.
Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
rust/hg-core/src/lib.rs | ||
---|---|---|
78 | I like using {!r} so that the substituted entry is quoted and unambiguous. | |
rust/hg-cpython/src/parsers.rs | ||
42 | If you are going to a comment I would say why. However in this case it probably isn't worth having a comment. You can also do this on one line entry.state.into::<u8>() as c_char which I think is simple enough. |
rust/hg-core/src/lib.rs | ||
---|---|---|
78 | Sorry yes. I've been writing too much python at work. |
I like using {!r} so that the substituted entry is quoted and unambiguous.