Hi, for the moment I'm doing it that way, but is there a nicer way to init those fields directly in the {} braces?
And also can I store something like (tx,rx) as a tuple in that struct? I've tried but compilation failed.
pub struct FileManager {
tx: Sender<bool>,
rx: Receiver<bool>,
}
impl Default for FileManager {
fn default() -> Self {
let (tx,rx) = std::sync::mpsc::channel();
FileManager {
tx,
rx,
}
}
}