aboutsummaryrefslogtreecommitdiff
path: root/examples/wasm
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2023-04-12 22:13:44 +0000
committerGitHub <[email protected]>2023-04-12 22:13:44 +0000
commit5a03b2e9e802626127038cff5634795f576f1c69 (patch)
treedc283068d72f8e14dcc14aeaff314c23f8827f0e /examples/wasm
parentba8cafb20c2458a2016c7db3efd91d718f1a91b6 (diff)
parent4863f88d02ca1821eac534729fb9ba347a8c6726 (diff)
Merge #1359
1359: Make Hertz constructors `const` r=Dirbaio a=sgoll This PR makes `Hertz` associated functions `hz()`, `khz()`, `mhz()` and their unassociated variants `const`, allowing `Hertz` to be used more easily in constant values: ```rust const FREQ1: Hertz = Hertz::khz(120); const FREQ2: Hertz = mhz(1); ``` This follows the pattern used for similar types such as `Duration` and `Instant`, from `embassy-time/src/duration.rs` and `embassy-time/src/instant.rs`, respectively. https://github.com/embassy-rs/embassy/blob/ba8cafb20c2458a2016c7db3efd91d718f1a91b6/embassy-time/src/duration.rs#L44-L47 https://github.com/embassy-rs/embassy/blob/ba8cafb20c2458a2016c7db3efd91d718f1a91b6/embassy-time/src/instant.rs#L29-L34 Co-authored-by: Sebastian Goll <[email protected]>
Diffstat (limited to 'examples/wasm')
0 files changed, 0 insertions, 0 deletions