diff --git a/crates/oyster_runtime/src/pipeline.rs b/crates/oyster_runtime/src/pipeline.rs index 6708110..f72f341 100644 --- a/crates/oyster_runtime/src/pipeline.rs +++ b/crates/oyster_runtime/src/pipeline.rs @@ -48,7 +48,7 @@ impl<'a> PreparedCommand<'a> { let mut words = command.0.iter().map(|word| { let mut words = word.0.iter(); - let mut s = match words.next().expect("words need to have >1 parts") { + let mut s = match words.next().unwrap() { ast::WordPart::Text(text) => Cow::from(*text), }; @@ -60,7 +60,7 @@ impl<'a> PreparedCommand<'a> { s }); - let cmd = words.next().expect("words need to have >1 parts"); + let cmd = words.next().unwrap(); let args = words.collect(); let redirect = command.1; @@ -177,7 +177,7 @@ impl Shell { let mut last_cmd = cmds .next() .map(|cmd| PreparedCommand::new(cmd, self)) - .expect("pipelines need to have >1 commands"); + .unwrap(); for cmd in cmds { let mut cmd = PreparedCommand::new(cmd, self); let (output, input) = create_pipe()?;