Explain runtime invariants and avoid redundant unwraps
This commit is contained in:
1 parent
34f2f07301
commit
1b51ba83b4
116 files changed
+1643
-515
No files matched your search
@@ -47,7 +47,10 @@ pub fn daemonize() -> Result<(), String> {
|
||||
}
|
||||
|
||||
fn confirm(child: &mut Child) -> Result<(), String> {
|
||||
let stdout = child.stdout.take().unwrap();
|
||||
let stdout = child
|
||||
.stdout
|
||||
.take()
|
||||
.expect("the child was spawned with piped standard output");
|
||||
let (tx, rx) = std::sync::mpsc::sync_channel(1);
|
||||
std::thread::spawn(move || {
|
||||
let mut reader = BufReader::new(stdout);
|
||||
|
||||
Reference in new issue
Block a user