rust-elements
rust-elements copied to clipboard
One shot cargo fmt
I think we should do it earlier when the diff is smaller and the project is smaller in scope. Otherwise, it becomes a big task to do it file by file as with rust-bitcoin. So far, we have had good experiences with rust-miniscript. Most rust-bitcoin developers are also in favor of using it, and I think we should get it done when the diff is relatively small and very easy to review/reproduce.
Curious what do @apoelstra, @stevenroose, and others think about this.
Yeah, I think I can live with this
I'm generally not a fan of formatters. I think formatting can help in presenting and conveying information so formatting is part of the process of writing code and formatting can/should also be a subject of review. Readability of code is important, especially in an information-dense language like Rust. Anyway, my 2 cents, won't veto anything ofc.
But just went through the struggle of formatting rust-secp256k1-zkp various times after submitting to CI :|
@RCasatta I am still seeking concept ACKs on this. What are your opinions on cargo fmt?
@RCasatta I am still seeking concept ACKs on this. What are your opinions on cargo fmt?
cargo fmt is a strong concept ACK for me.
Sometimes it's not as perfect as manual formatting, like not having bytes vec in octets or spanning a method chain in million lines. However, the benefit of having an automatic check in CI and less formatting nits turnaround outweighs the downsides.
Also, I personally find it useful to write code without thinking about formatting cause I know you can fix it easily and without a doubt.
I plan to go through the diff and add another commit adding rustfmt::skip
.
Based on Yeah, I think I can live with this - @apoelstra cargo fmt is a strong concept ACK for me - @RCasatta
and a minor complaint I'm generally not a fan of formatters. ...won't veto anything ofc - @stevenroose
I will open this for review after adding rustfmt::skip
to oddly formatted things.
concept ACK - I don't ever want to think or bikeshed about formatting
Reviewing this with a refreshed ACK from @delta1 and the comments posted before. https://github.com/ElementsProject/rust-elements/pull/80#issuecomment-995969709