Make raw standard stream constructors const

This commit is contained in:
Tomasz Miąsko
2020-08-20 00:00:00 +00:00
parent 479c23bb49
commit 4a00421ba4
10 changed files with 33 additions and 30 deletions

View File

@@ -5,7 +5,7 @@ pub struct Stdout;
pub struct Stderr;
impl Stdin {
pub fn new() -> Stdin {
pub const fn new() -> Stdin {
Stdin
}
}
@@ -17,7 +17,7 @@ impl io::Read for Stdin {
}
impl Stdout {
pub fn new() -> Stdout {
pub const fn new() -> Stdout {
Stdout
}
}
@@ -33,7 +33,7 @@ impl io::Write for Stdout {
}
impl Stderr {
pub fn new() -> Stderr {
pub const fn new() -> Stderr {
Stderr
}
}