Skip to content

Commit

Permalink
Merge pull request #563 from Dirbaio/docs-fixes
Browse files Browse the repository at this point in the history
Misc doc fixes.
  • Loading branch information
eldruin committed Jan 10, 2024
2 parents f8c79fe + ebc756e commit d90b59b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/migrating-from-0.2-to-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ have mutable state or access exclusive resources.
for implementations.

For ease of use, you might want to provide inherent methods that take `&self` if the hardware permits it. In this case,
you might need to do `&*self` to call them from the trait methods. Otherwise Rust will resolve the
you might need to do `*self` to call them from the trait methods. Otherwise Rust will resolve the
method call to the trait method, causing infinite recursion.

```rust
Expand All @@ -358,12 +358,12 @@ impl HalPin {

impl InputPin for HalPin {
fn is_high(&mut self) -> Result<bool, Self::Error> {
// Needs `&*self` so that the inherent `is_high` is picked.
Ok((&*self).is_high())
// Needs `*self` so that the inherent `is_high` is picked.
Ok((*self).is_high())
}

fn is_low(&mut self) -> Result<bool, Self::Error> {
Ok((&*self).is_low())
Ok((*self).is_low())
}
}
```
Expand Down
2 changes: 2 additions & 0 deletions embedded-hal-async/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ No unreleased changes yet.

## [v1.0.0] - 2023-12-28

Check out the [announcement blog post](https://blog.rust-embedded.org/embedded-hal-v1/) and the [migration guide](../docs/migrating-from-0.2-to-1.0.md) for help with migrating from v0.2 to v1.0.

- Updated `embedded-hal` to version `1.0.0`.

## [v1.0.0-rc.3] - 2023-12-14
Expand Down
2 changes: 2 additions & 0 deletions embedded-hal-nb/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ No unreleased changes

## [v1.0.0] - 2023-12-28

Check out the [announcement blog post](https://blog.rust-embedded.org/embedded-hal-v1/) and the [migration guide](../docs/migrating-from-0.2-to-1.0.md) for help with migrating from v0.2 to v1.0.

- Updated `embedded-hal` to version `1.0.0`.

## [v1.0.0-rc.3] - 2023-12-14
Expand Down
2 changes: 2 additions & 0 deletions embedded-hal/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ No unreleased changes yet.

## [v1.0.0] - 2023-12-28

Check out the [announcement blog post](https://blog.rust-embedded.org/embedded-hal-v1/) and the [migration guide](../docs/migrating-from-0.2-to-1.0.md) for help with migrating from v0.2 to v1.0.

- gpio: remove `ToggleableOutputPin`, move `toggle()` to `StatefulOutputPin`.

## [v1.0.0-rc.3] - 2023-12-14
Expand Down

0 comments on commit d90b59b

Please sign in to comment.