diff options
author | 2020-10-14 00:50:01 +0100 | |
---|---|---|
committer | 2020-10-14 00:50:01 +0100 | |
commit | 320881e0b57d16a4f768a7c8543571e26113e904 (patch) | |
tree | dd59b1f1eec5f8a5038ec4b34fc0e94982c9cc0c /cortex-m-semihosting/src/lib.rs | |
parent | 432e5f527430394570d1d07454e26cc41d5b2936 (diff) | |
download | cortex-m-320881e0b57d16a4f768a7c8543571e26113e904.tar.gz cortex-m-320881e0b57d16a4f768a7c8543571e26113e904.tar.zst cortex-m-320881e0b57d16a4f768a7c8543571e26113e904.zip |
Merge HStdout and HStderr into the same type
This commit copies
https://github.com/rust-embedded/cortex-m-semihosting/pull/41
into the cortex-m repository.
Diffstat (limited to 'cortex-m-semihosting/src/lib.rs')
-rw-r--r-- | cortex-m-semihosting/src/lib.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cortex-m-semihosting/src/lib.rs b/cortex-m-semihosting/src/lib.rs index b70dea0..de52ae1 100644 --- a/cortex-m-semihosting/src/lib.rs +++ b/cortex-m-semihosting/src/lib.rs @@ -25,7 +25,7 @@ //! //! # Example //! -//! ## Using `hio::HStdout` +//! ## Using `hio::hstdout` //! //! This example will demonstrate how to print formatted strings. //! @@ -35,11 +35,7 @@ //! //! // This function will be called by the application //! fn print() -> Result<(), core::fmt::Error> { -//! let mut stdout = match hio::hstdout() { -//! Ok(fd) => fd, -//! Err(()) => return Err(core::fmt::Error), -//! }; -//! +//! let mut stdout = hio::hstdout().map_err(|_| core::fmt::Error)?; //! let language = "Rust"; //! let ranking = 1; //! |