Skip to content

Commit 55c8bac

Browse files
committed
Make error message consistent with source code
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
1 parent 0d707d1 commit 55c8bac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/traits.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@ Here’s the error:
192192
```text
193193
error: type `std::fs::File` does not implement any method in scope named `write`
194194
195-
let result = f.write(b"whatever");
196-
^~~~~~~~~~~~~~~~~~
195+
let result = f.write("whatever".as_bytes());
196+
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
197197
```
198198

199199
We need to `use` the `Write` trait first:

0 commit comments

Comments
 (0)