Skip to content

Commit 075ecd3

Browse files
bors[bot]eldruin
andauthored
Merge #33
33: Prepare 1.0.0 r=therealprof a=eldruin Release depends on #30 Co-authored-by: Diego Barrios Romero <[email protected]>
2 parents b9b7bed + 56f6faa commit 075ecd3

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v1.0.0] - 2020-07-07
11+
1012
### Changed
1113

1214
- [breaking-change] The `unstable` feature and its code has been removed.
@@ -31,6 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3133

3234
Initial release
3335

34-
[Unreleased]: https://github.com/rust-embedded/nb/compare/v0.1.2...HEAD
36+
[Unreleased]: https://github.com/rust-embedded/nb/compare/v1.0.0...HEAD
37+
[v1.0.0]: https://github.com/rust-embedded/nb/compare/v0.1.2...v1.0.0
3538
[v0.1.2]: https://github.com/rust-embedded/nb/compare/v0.1.1...v0.1.2
3639
[v0.1.1]: https://github.com/rust-embedded/nb/compare/v0.1.0...v0.1.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ repository = "https://github.com/rust-embedded/nb"
99
homepage = "https://github.com/rust-embedded/nb"
1010
documentation = "https://docs.rs/nb"
1111
readme = "README.md"
12-
version = "0.1.2"
12+
version = "1.0.0" # remember to update html_root_url
1313
edition = "2018"

src/lib.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,21 +144,24 @@
144144
//! Turn on an LED for one second and *then* loops back serial data.
145145
//!
146146
//! ```
147+
//! use core::convert::Infallible;
147148
//! use nb::block;
148149
//!
149150
//! use hal::{Led, Serial, Timer};
150151
//!
152+
//! # fn main() -> Result<(), Infallible> {
151153
//! // Turn the LED on for one second
152154
//! Led.on();
153-
//! block!(Timer.wait()).unwrap(); // NOTE(unwrap) E = Infallible
155+
//! block!(Timer.wait())?;
154156
//! Led.off();
155157
//!
156158
//! // Serial interface loopback
157-
//! # return;
159+
//! # return Ok(());
158160
//! loop {
159-
//! let byte = block!(Serial.read()).unwrap();
160-
//! block!(Serial.write(byte)).unwrap();
161+
//! let byte = block!(Serial.read())?;
162+
//! block!(Serial.write(byte))?;
161163
//! }
164+
//! # }
162165
//!
163166
//! # mod hal {
164167
//! # use nb;
@@ -170,8 +173,8 @@
170173
//! # }
171174
//! # pub struct Serial;
172175
//! # impl Serial {
173-
//! # pub fn read(&self) -> nb::Result<u8, ()> { Ok(0) }
174-
//! # pub fn write(&self, _: u8) -> nb::Result<(), ()> { Ok(()) }
176+
//! # pub fn read(&self) -> nb::Result<u8, Infallible> { Ok(0) }
177+
//! # pub fn write(&self, _: u8) -> nb::Result<(), Infallible> { Ok(()) }
175178
//! # }
176179
//! # pub struct Timer;
177180
//! # impl Timer {
@@ -181,6 +184,7 @@
181184
//! ```
182185
183186
#![no_std]
187+
#![doc(html_root_url = "https://docs.rs/nb/1.0.0")]
184188

185189
use core::fmt;
186190

0 commit comments

Comments
 (0)