Skip to content

Commit

Permalink
first -> into_first
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Dec 28, 2023
1 parent d3cbdec commit 1fea688
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/expr/core/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ pub struct MultiExprError(Box<[ExprError]>);

impl MultiExprError {
/// Returns the first error.
pub fn first(self) -> ExprError {
pub fn into_first(self) -> ExprError {
self.0.into_vec().into_iter().next().expect("first error")
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/expr/core/src/expr/wrapper/strict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ where

async fn eval(&self, input: &DataChunk) -> Result<ArrayRef> {
match self.inner.eval(input).await {
Err(ExprError::Multiple(_, errors)) => Err(errors.first()),
Err(ExprError::Multiple(_, errors)) => Err(errors.into_first()),
res => res,
}
}

async fn eval_v2(&self, input: &DataChunk) -> Result<ValueImpl> {
match self.inner.eval_v2(input).await {
Err(ExprError::Multiple(_, errors)) => Err(errors.first()),
Err(ExprError::Multiple(_, errors)) => Err(errors.into_first()),
res => res,
}
}
Expand Down

0 comments on commit 1fea688

Please sign in to comment.