Make error message consistent with source code
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
This commit is contained in:
parent
0d707d15f6
commit
55c8bacc3a
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user