diff options
| author | peferron <pe.ferron@gmail.com> | 2015-05-16 17:01:25 -0700 |
|---|---|---|
| committer | peferron <pe.ferron@gmail.com> | 2015-05-16 17:01:25 -0700 |
| commit | 55c8bacc3a07dae23d79ab083822518da14ffdf9 (patch) | |
| tree | e44710ac8f1c4314c77af2fe48fe3d9d53d43af6 /src | |
| parent | 0d707d15f6ee4bef23cca36ce5f98aaf0ca707f9 (diff) | |
| download | rust-55c8bacc3a07dae23d79ab083822518da14ffdf9.tar.gz rust-55c8bacc3a07dae23d79ab083822518da14ffdf9.zip | |
Make error message consistent with source code
The source code uses `"whatever".as_bytes()`, not `b"whatever"`.
Diffstat (limited to 'src')
| -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: |
