mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Use write_string instead of write_str in example code (#462)
This commit is contained in:
committed by
Philipp Oppermann
parent
81d3001c07
commit
91001d9158
@@ -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();
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user