[
https://issues.apache.org/jira/browse/AVRO-3410?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Tzvetanov Grigorov reassigned AVRO-3410:
-----------------------------------------------
Assignee: Martin Tzvetanov Grigorov
> [Rust] lint failure
> -------------------
>
> Key: AVRO-3410
> URL: https://issues.apache.org/jira/browse/AVRO-3410
> Project: Apache Avro
> Issue Type: Bug
> Reporter: Ryan Skraba
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
>
>
> {code:java}
> Checking criterion v0.3.5
> error: this function's return value is unnecessarily wrapped by `Result`
> --> src/reader.rs:192:5
> |
> 192 | / fn read_codec(&mut self, metadata: &HashMap<String, Value>) ->
> AvroResult<()> {
> 193 | | if let Some(codec) = metadata
> 194 | | .get("avro.codec")
> 195 | | .and_then(|codec| {
> ... |
> 206 | | Ok(())
> 207 | | }
> | |_____^
> |
> = note: `-D clippy::unnecessary-wraps` implied by `-D clippy::all`
> = help: for further information visit
> https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
> help: remove `Result` from the return type...
> |
> 192 | fn read_codec(&mut self, metadata: &HashMap<String, Value>) -> () {
> | ^^
> help: ...and change the returning expressions
> |
> 206 | ()
> |error: this function's return value is unnecessarily wrapped by `Result`
> --> src/reader.rs:209:5
> |
> 209 | / fn read_user_metadata(&mut self, key: String, value: Value) ->
> AvroResult<()> {
> 210 | | match value {
> 211 | | Value::Bytes(ref vec) => {
> 212 | | self.user_metadata.insert(key, vec.clone());
> ... |
> 222 | | }
> 223 | | }
> | |_____^
> |
> = help: for further information visit
> https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
> help: remove `Result` from the return type...
> |
> 209 | fn read_user_metadata(&mut self, key: String, value: Value) -> () {
> | ^^
> help: ...and change the returning expressions
> |
> 213 | ()
> 214 | }
> 215 | wrong => {
> 216 | warn!(
> 217 | "User metadata values must be Value::Bytes, found
> {:?}",
> 218 | wrong
> ...error: aborting due to 2 previous errorserror: could not compile
> `apache-avro`
> {code}
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)