timsaucer commented on code in PR #19357:
URL: https://github.com/apache/datafusion/pull/19357#discussion_r2624255896
##########
datafusion-cli/src/catalog.rs:
##########
@@ -219,12 +219,12 @@ impl SchemaProvider for DynamicObjectStoreSchemaProvider {
}
pub fn substitute_tilde(cur: String) -> String {
- if let Some(usr_dir_path) = home_dir() {
- if let Some(usr_dir) = usr_dir_path.to_str() {
- if cur.starts_with('~') && !usr_dir.is_empty() {
- return cur.replacen('~', usr_dir, 1);
- }
- }
+ if let Some(usr_dir_path) = home_dir()
+ && let Some(usr_dir) = usr_dir_path.to_str()
+ && cur.starts_with('~')
+ && !usr_dir.is_empty()
+ {
+ return cur.replacen('~', usr_dir, 1);
Review Comment:
So much nicer!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]