-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There's no need to wrap a StdinLock in a BufReader because StdinLock already implements BufRead. I had originally written a lot of this code using Stdin instead of StdinLock, where Stdin does not implement BufRead. But StdinLock is the right thing to use here. Also, it is so much easier to use StdinLock now than it used to be. You used to have to do something like this: let stdin = io::stdin(); let stdin = stdin.lock(); Otherwise the lifetimes wouldn't work out. Turns out that we recently made a change to Stdin::lock such that it returns a StdinLock<'static> instead of a lifetime bound to Stdin. Which is so much nicer. Ref: rust-lang/rust#93965
- Loading branch information
1 parent
20e5cdd
commit 0e1226a
Showing
1 changed file
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters