shruti2522 commented on code in PR #17100:
URL: https://github.com/apache/datafusion/pull/17100#discussion_r2267426716


##########
datafusion/functions/src/datetime/common.rs:
##########
@@ -412,8 +412,8 @@ where
                     }?;
 
                     let r = op(x, v);
-                    if r.is_ok() {
-                        val = Some(Ok(op2(r.unwrap())));
+                    if let Ok(inner) = r {
+                        val = Some(Ok(op2(inner)));

Review Comment:
   [B] simplified `is_ok() + unwrap()` to `if let Some(...) =`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to