summaryrefslogtreecommitdiff
path: root/embassy-hal-common
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2022-06-12 22:15:44 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2022-06-12 22:22:31 +0200
commita8703b75988e1e700af701116464025679d2feb8 (patch)
treef4ec5de70ec05e793a774049e010935ac45853ed /embassy-hal-common
parent6199bdea710cde33e5d5381b6d6abfc8af46df19 (diff)
downloadembassy-a8703b75988e1e700af701116464025679d2feb8.zip
Run rustfmt.
Diffstat (limited to 'embassy-hal-common')
-rw-r--r--embassy-hal-common/src/drop.rs4
-rw-r--r--embassy-hal-common/src/ratio.rs1
2 files changed, 2 insertions, 3 deletions
diff --git a/embassy-hal-common/src/drop.rs b/embassy-hal-common/src/drop.rs
index 3a90dd50..6ef716f9 100644
--- a/embassy-hal-common/src/drop.rs
+++ b/embassy-hal-common/src/drop.rs
@@ -7,9 +7,7 @@ pub struct OnDrop<F: FnOnce()> {
impl<F: FnOnce()> OnDrop<F> {
pub fn new(f: F) -> Self {
- Self {
- f: MaybeUninit::new(f),
- }
+ Self { f: MaybeUninit::new(f) }
}
pub fn defuse(self) {
diff --git a/embassy-hal-common/src/ratio.rs b/embassy-hal-common/src/ratio.rs
index ce7e4b1b..9a8808a3 100644
--- a/embassy-hal-common/src/ratio.rs
+++ b/embassy-hal-common/src/ratio.rs
@@ -1,4 +1,5 @@
use core::ops::{Add, Div, Mul};
+
use num_traits::{CheckedAdd, CheckedDiv, CheckedMul};
/// Represents the ratio between two numbers.