Use write_string instead of write_str in example code (#462)

This commit is contained in:
Kazushige Tominaga
2018-08-14 19:57:18 +09:00
committed by Philipp Oppermann
parent 81d3001c07
commit 91001d9158

View File

@@ -347,7 +347,7 @@ pub fn print_something() {
}; };
writer.write_byte(b'H'); writer.write_byte(b'H');
writer.write_str("ello! ").unwrap(); writer.write_string("ello! ");
write!(writer, "The numbers are {} and {}", 42, 1.0/3.0).unwrap(); write!(writer, "The numbers are {} and {}", 42, 1.0/3.0).unwrap();
} }
``` ```