Rollup merge of #22311 - lfairy:consistent-fmt, r=alexcrichton
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
This commit is contained in:
commit
bf52f2eef5
11 changed files with 35 additions and 35 deletions
|
|
@ -21,7 +21,7 @@ struct Foo<'a> {
|
|||
|
||||
struct Bar;
|
||||
|
||||
impl fmt::Writer for Bar {
|
||||
impl fmt::Write for Bar {
|
||||
fn write_str(&mut self, _: &str) -> fmt::Result {
|
||||
Ok(())
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ fn main() {
|
|||
|
||||
let mut s = Bar;
|
||||
{
|
||||
use std::fmt::Writer;
|
||||
use std::fmt::Write;
|
||||
write!(&mut s, "test");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,9 +165,9 @@ pub fn main() {
|
|||
}
|
||||
|
||||
// Basic test to make sure that we can invoke the `write!` macro with an
|
||||
// io::Writer instance.
|
||||
// fmt::Write instance.
|
||||
fn test_write() {
|
||||
use std::fmt::Writer;
|
||||
use std::fmt::Write;
|
||||
let mut buf = String::new();
|
||||
write!(&mut buf, "{}", 3);
|
||||
{
|
||||
|
|
@ -194,7 +194,7 @@ fn test_print() {
|
|||
// Just make sure that the macros are defined, there's not really a lot that we
|
||||
// can do with them just yet (to test the output)
|
||||
fn test_format_args() {
|
||||
use std::fmt::Writer;
|
||||
use std::fmt::Write;
|
||||
let mut buf = String::new();
|
||||
{
|
||||
let w = &mut buf;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue