tokcum commented on pull request #2545: URL: https://github.com/apache/thrift/pull/2545#issuecomment-1072876610
> Looks good! Suggest replacing use of comparison with "" with `Option` and `if let` for the UDS usages. > > Thank you! Surprisingly the linter discouraged me to use if let and pointed me to .is_none() just to complain again and proposing a match statement. This didn't happen when I compiled with cargo build but when I used make to run the tests. It looks like additional rules apply depending on which tools are used. Just for reference, the two messages I received where: ``` error: redundant pattern matching, consider using `is_none()` error: You checked before that `unwrap()` cannot fail. Instead of checking and unwrapping, it's better to use `if let` or `match`. ``` So I used the match statement. -- 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]
