From 4a00421ba4daae419d06b67bd1bb46d7930b0dc7 Mon Sep 17 00:00:00 2001 From: Tomasz Miąsko Date: Thu, 20 Aug 2020 00:00:00 +0000 Subject: Make raw standard stream constructors const --- library/std/src/sys/unix/stdio.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'library/std/src/sys/unix/stdio.rs') diff --git a/library/std/src/sys/unix/stdio.rs b/library/std/src/sys/unix/stdio.rs index bbf5dd65fa5..a05fe8165cf 100644 --- a/library/std/src/sys/unix/stdio.rs +++ b/library/std/src/sys/unix/stdio.rs @@ -7,7 +7,7 @@ pub struct Stdout(()); pub struct Stderr(()); impl Stdin { - pub fn new() -> Stdin { + pub const fn new() -> Stdin { Stdin(()) } } @@ -28,7 +28,7 @@ impl io::Read for Stdin { } impl Stdout { - pub fn new() -> Stdout { + pub const fn new() -> Stdout { Stdout(()) } } @@ -53,7 +53,7 @@ impl io::Write for Stdout { } impl Stderr { - pub fn new() -> Stderr { + pub const fn new() -> Stderr { Stderr(()) } } -- cgit 1.4.1-3-g733a5