#[cfg(feature = "ok")]
fn main() {
use std::sync::mpsc;
use std::thread;
let (tx, rx) = mpsc::channel();
thread::spawn(move || {
let instance = String::from("hi");
println!("Got from tx: {}", instance);
tx.send(instance).unwrap();
});
let received = rx.recv().unwrap();
println!("Got from rx: {}", received);
}
#[cfg(feature = "err")]
fn main() {
use std::sync::mpsc;
use std::thread;
let (tx, rx) = mpsc::channel();
thread::spawn(move || {
let instance = String::from("hi");
println!("Got from tx: {}", instance);
tx.send(instance).unwrap();
println!("val is {}", instance);
});
let received = rx.recv().unwrap();
println!("Got from rx: {}", received);
}
#[cfg(all(not(feature = "ok"), not(feature = "err")))]
fn main() {
use aide::hello;
hello();
}