Xuanwo commented on PR #4122:
URL: https://github.com/apache/opendal/pull/4122#issuecomment-1920807834
clippy is the rust lint that help us write better code, for example:
```shell
error: you seem to be trying to use `match` for destructuring a single
pattern. Consider using `if let`
--> bindings/python/src/file.rs:399:13
|
399 | / match &mut *state {
400 | | AsyncFileState::Writer(w) => {
401 | | w.close()
402 | | .await
... |
405 | | _ => {}
406 | | }
| |_____________^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#single_match
help: try
|
399 ~ if let AsyncFileState::Writer(w) = &mut *state {
400 + w.close()
401 + .await
402 + .map_err(|err|
PyIOError::new_err(err.to_string()))?;
403 + }
```
--
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]