diff options
| -rw-r--r-- | src/doc/trpl/traits.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/doc/trpl/traits.md b/src/doc/trpl/traits.md index 889205ad5d8..d22c9cba082 100644 --- a/src/doc/trpl/traits.md +++ b/src/doc/trpl/traits.md @@ -192,8 +192,8 @@ Here’s the error: ```text error: type `std::fs::File` does not implement any method in scope named `write` -let result = f.write(b"whatever"); - ^~~~~~~~~~~~~~~~~~ +let result = f.write("whatever".as_bytes()); + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` We need to `use` the `Write` trait first: |
