Switching documentation to be more clear about potential errors

This commit is contained in:
Dan Vail 2022-08-09 12:57:19 -05:00
parent 0436067210
commit ee8a01f596

View File

@ -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
///