Skip to content

Commit

Permalink
minor: prefer ? to and_then
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Dec 4, 2024
1 parent cc03aab commit 16a5790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/kamp/kak.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ where
return Err(Error::other("cannot capture stdin of kak process"));
};

stdin.write_all(cmd.as_ref()).and_then(|_| child.wait())
stdin.write_all(cmd.as_ref())?;
child.wait()
}

pub(crate) fn connect<S: AsRef<str>>(session: S, cmd: String) -> Result<ExitStatus> {
Expand Down

0 comments on commit 16a5790

Please sign in to comment.