nit: inconsistent use of crate::Error vs Error in single transport src file
- Dominant language
- Rust
- Stars
- 12.5k
- Forks
- 1.3k
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 24
Description
While working off a copy of the excellent transport module, found one file where `crate::Error` was used inconsistently with the rest. Not a bug. Just the odd style issue that 'clippy' isn't going to catch.
The file https://github.com/hyperium/tonic/blob/fade2873fdecc27f491332e16ef0037120e803c4/tonic/src/transport/channel/service/reconnect.rs#L1
both defines a 'use' for the symbol, and then uses that symbol but also uses 'crate::Error' in many places. Likely a result of commits at different times.
Would a PR be accepted where the file was made to be consistent with other files in the `transport` module? Removing the 'use' statement and explicitly using 'crate::Error' in all those places in the file.
In my own copy of the 'transport' module, I was changing 'crate::Error' to be 'crate::BoxError', to disambiguate it from the public 'transport::Error' type. I'm not suggesting that here, but the use of the naked 'Error' type on some lines and 'crate::Error' on other lines in that one file when crate::Error was used about 80 times in the whole module struck me as perhaps being desirable and acceptable to change.
Contributor guide
Assessment
This issue has not been assessed yet.