Skip to content

Commit 3d4426a

Browse files
Merge pull request #513 from passchaos/master
不应该再加上&mut,已经是可变引用
2 parents ff263c8 + 6c29f91 commit 3d4426a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io/io.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Read 由于每调用一次 `read` 方法都会调用一次系统API与内核交
2626
use std::io;
2727

2828
fn read_from_stdin(buf: &mut String) -> io::Result<()> {
29-
try!(io::stdin().read_line(&mut buf));
29+
try!(io::stdin().read_line(buf));
3030
Ok(())
3131
}
3232
```

0 commit comments

Comments
 (0)