-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
thermal: remove panic formatting and
Debug
impls (#1738)
Currently, the `thermal` task uses `unwrap()` in a bunch of places, requiring it to derive `Debug` for a bunch of stuff. This commit changes those to `unwrap_lite()`, and removes many of the derived `Debug` impls. On `gimlet-f`, this shaves off about 1K of flash: before: ``` thermal flash 23316 23328 32768 ram 7820 8192 8192 ``` after: ``` thermal flash 22392 22400 32768 ram 7820 8192 8192 ``` It would be nice to also remove the derived `Debug` from types like `SensorId`, but it looks like that's currently used by `validate_api` --- I wasn't sure if any of the `validate_api` types are used in control-plane comms, so I didn't touch that yet. May do so in a follow-up.
- Loading branch information
Showing
4 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,6 @@ impl ThermalProperties { | |
#[derive( | ||
Copy, | ||
Clone, | ||
Debug, | ||
Eq, | ||
PartialEq, | ||
Serialize, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters