mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
17 lines
270 B
Rust
17 lines
270 B
Rust
//@ run-pass
|
|
|
|
#![allow(unused_must_use)]
|
|
/*
|
|
This is about the simplest program that can successfully send a
|
|
message.
|
|
*/
|
|
|
|
use std::sync::mpsc::channel;
|
|
|
|
pub fn main() {
|
|
let (tx, rx) = channel();
|
|
tx.send(42);
|
|
let r = rx.recv();
|
|
println!("{:?}", r);
|
|
}
|