We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ca894f commit ff334c2Copy full SHA for ff334c2
src/unix.rs
@@ -100,10 +100,9 @@ impl Client {
100
if parts.next().unwrap() != "fifo" {
101
return Ok(None);
102
}
103
- let path = Path::new(parts.next().ok_or(io::Error::new(
104
- io::ErrorKind::InvalidInput,
105
- "expected ':' after `fifo`",
106
- ))?);
+ let path = Path::new(parts.next().ok_or_else(|| {
+ io::Error::new(io::ErrorKind::InvalidInput, "expected ':' after `fifo`")
+ })?);
107
let file = OpenOptions::new().read(true).write(true).open(path)?;
108
Ok(Some(Client::Fifo {
109
file,
0 commit comments