diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-09-24 19:25:21 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-09-24 19:25:21 +0200 |
| commit | 6f9c1323a7a0fe162a5642e229d54afec7ccb299 (patch) | |
| tree | 99565ff9c8a99f1667e2f029f369eff798e94b16 /library/std | |
| parent | 45700a9d58679131a628ddc95dd8ce0fcf1f2430 (diff) | |
| download | rust-6f9c1323a7a0fe162a5642e229d54afec7ccb299.tar.gz rust-6f9c1323a7a0fe162a5642e229d54afec7ccb299.zip | |
Call ReentrantMutex::init() in stdout().
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/io/stdio.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 05bdbe0f563..b7d3c47e24b 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -548,7 +548,9 @@ pub fn stdout() -> Stdout { } } }); - ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw()))) + let r = ReentrantMutex::new(RefCell::new(LineWriter::new(stdout_raw()))); + r.init(); + r }), } } |
