Closed Fumuran closed 1 month ago
For some reason api.rs
file in the tx-prover
keeps generating with strange formatting, on which rustfmt
is complaining.
For some reason
api.rs
file in thetx-prover
keeps generating with strange formatting, on whichrustfmt
is complaining.
prost-build
does its own formatting with prettyplease
by default and the format
feature is enabled by default, too. So since that code is already formatted plus generated code tends not to be looked at very much it seems fine to just skip the formatting from rustfmt
for the generated module. You could just add this in bin/tx-prover/src/server/mod.rs
:
#[rustfmt::skip]
pub mod generated;
So since that code is already formatted plus generated code tends not to be looked at very much it seems fine to just skip the formatting from
rustfmt
for the generated module. You could just add this inbin/tx-prover/src/server/mod.rs
:
I was thinking about it, It was just strange to me that current version of this module in next
branch has a different formatting, which is accepted by the CI formatting checker. Somehow Santiago managed to make the proper formatting, so I should be able to do so too.
Well, it turned out that implementation of the foreign account verification took only a few more lines, so I included it in this PR.
I was thinking about it, It was just strange to me that current version of this module in
next
branch has a different formatting, which is accepted by the CI formatting checker. Somehow Santiago managed to make the proper formatting, so I should be able to do so too.
If you force a rebuild of that file on next
it also does not conform to what rustfmt expects. So I think the proper formatting on next is just the result of make format
. Actually, the tx_kernel_errors.rs
has the same issue now and it keeps regenerating on next
and shows up as a changed file in git status
, which is a bit annoying. I think we should probably add a rustfmt::skip
to both of these modules. Wdyt :slightly_smiling_face: ?
I think we should probably add a
rustfmt::skip
to both of these modules.
Yeah - for auto-generated files I think we should skip the formatting so that they don't change as rustfmt rules get updated.
WiP
TODO: