Add doctest

This commit is contained in:
Maurits van Riezen 2022-09-07 16:36:32 +02:00 committed by GitHub
parent 1dac6da408
commit 0a9b49c794
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1827,6 +1827,7 @@ impl<'a> Formatter<'a> {
/// }
///
/// assert_eq!(&format!("{:+}", Foo(23)), "Foo(+23)");
/// assert_eq!(&format!("{:+}", Foo(-32)), "Foo(-23)");
/// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
/// ```
#[must_use]