timsaucer commented on code in PR #1564:
URL: 
https://github.com/apache/datafusion-python/pull/1564#discussion_r3329281932


##########
crates/core/src/context.rs:
##########
@@ -1562,10 +1577,9 @@ impl PySessionContext {
 pub fn parse_file_compression_type(
     file_compression_type: Option<String>,
 ) -> Result<FileCompressionType, PyErr> {
-    
FileCompressionType::from_str(&*file_compression_type.unwrap_or("".to_string()).as_str())
-        .map_err(|_| {
-            PyValueError::new_err("file_compression_type must one of: gzip, 
bz2, xz, zstd")
-        })
+    
FileCompressionType::from_str(&file_compression_type.unwrap_or_default()).map_err(|_|
 {
+        PyValueError::new_err("file_compression_type must one of: gzip, bz2, 
xz, zstd")
+    })

Review Comment:
   Drive by update to remove clippy warning that was specified at the module 
level.



-- 
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]

Reply via email to