Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 15a37128 authored by Martin Geisler's avatar Martin Geisler Committed by Cherrypicker Worker
Browse files

PDL: run the expected code through ‘rustfmt’ as well

Before we only formatted the newly generated code. The idea was to
compare this with the known-good code stored in the repository.

However, this requires us to carefully control the ‘rustfmt’
configuration: in particular, we need to copy a ‘rustfmt.toml’ file
into the directory from which we invoke ‘rustfmt’.

We can avoid this if we simply format both the new and the existing
code: this was the current settings of ‘rustfmt’ will take effect for
both pieces of code and we will be able to compare them for equality.

This change means that we don’t have to update any of the existing
known-good files if/when the common ‘rustfmt.toml’ files changes. This
change makes https://r.android.com/2096444 obsolete.

Test: atest 'pdl*'
(cherry picked from https://android-review.googlesource.com/q/commit:5c22776fe57a85b012fa7eea6e102c01da7a28b1)
Merged-In: I732cec8e08c8c8e8b70f40a1d074faecc89979ff
Change-Id: I732cec8e08c8c8e8b70f40a1d074faecc89979ff
parent 890803c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment