mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
Switching documentation to be more clear about potential errors
This commit is contained in:
parent
0436067210
commit
ee8a01f596
@ -119,12 +119,9 @@ pub trait Write {
|
||||
///
|
||||
/// This function will return an instance of [`Error`] on error.
|
||||
///
|
||||
/// Though it is possible for implementors of this trait to return an error, at the time
|
||||
/// of writing these docs, no implementation of [`std::fmt::Write`] in the standard library
|
||||
/// returns such an error.
|
||||
///
|
||||
/// When working with external crates, it is advised to check the implementation of this
|
||||
/// trait and anticipate any possible [`Error`]s.
|
||||
/// The purpose of std::fmt::Error is to abort the formatting operation when the underlying
|
||||
/// destination encounters some error preventing it from accepting more text; it should
|
||||
/// generally be propagated rather than handled, at least when implementing formatting traits.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user