Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
eprintln!("Hello, {}!", "world");
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fn main() {
|
||||
use ::std::io::Write;
|
||||
let (stderr, errmsg) = (&mut ::std::io::stderr(), "Error writing to stderr");
|
||||
writeln!(stderr, "Bye, world!").expect(errmsg);
|
||||
|
||||
let (goodbye, world) = ("Goodbye", "world");
|
||||
writeln!(stderr, "{}, {}!", goodbye, world).expect(errmsg);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
fn main() {
|
||||
use std::io::{self, Write};
|
||||
|
||||
io::stderr().write(b"Goodbye, world!").expect("Could not write to stderr");
|
||||
// With some finagling, you can do a formatted string here as well
|
||||
let goodbye = "Goodbye";
|
||||
let world = "world";
|
||||
io::stderr().write(&*format!("{}, {}!", goodbye, world).as_bytes()).expect("Could not write to stderr");
|
||||
// Clearly, if you want formatted strings there's no reason not to just use writeln!
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue