[ 
https://issues.apache.org/jira/browse/AVRO-3608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Tzvetanov Grigorov resolved AVRO-3608.
---------------------------------------------
    Fix Version/s: 1.12.0
                   1.11.2
       Resolution: Fixed

> Rust: Fix clippy errors in Rust 1.63.0
> --------------------------------------
>
>                 Key: AVRO-3608
>                 URL: https://issues.apache.org/jira/browse/AVRO-3608
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: rust
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.12.0, 1.11.2
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Rust clippy (lint) checks fail after the release of Rust 1.63.0.
>  
> {code:java}
>  error: you are deriving `PartialEq` and can implement `Eq`
>   --> avro/src/codec.rs:37:30
>    |
> 37 | #[derive(Clone, Copy, Debug, PartialEq, EnumIter, EnumString, 
> IntoStaticStr)]
>    |                              ^^^^^^^^^ help: consider deriving `Eq` as 
> well: `PartialEq, Eq`
>    |
>    = note: `-D clippy::derive-partial-eq-without-eq` implied by `-D 
> clippy::all`
>    = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eqerror:
>  you are deriving `PartialEq` and can implement `Eq`
>   --> avro/src/duration.rs:30:30
>    |
> 30 | #[derive(Debug, Copy, Clone, PartialEq)]
>    |                              ^^^^^^^^^ help: consider deriving `Eq` as 
> well: `PartialEq, Eq`
>    |
>    = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eqerror:
>  you are deriving `PartialEq` and can implement `Eq`
>   --> avro/src/duration.rs:57:30
>    |
> 57 | #[derive(Debug, Copy, Clone, PartialEq)]
>    |                              ^^^^^^^^^ help: consider deriving `Eq` as 
> well: `PartialEq, Eq`
>    |
>    = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eqerror:
>  you are deriving `PartialEq` and can implement `Eq`
>   --> avro/src/duration.rs:84:30
>    |
> 84 | #[derive(Debug, Copy, Clone, PartialEq)]
>    |                              ^^^^^^^^^ help: consider deriving `Eq` as 
> well: `PartialEq, Eq`
>    |
>    = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eqerror:
>  deref on an immutable reference
>    --> avro/src/encode.rs:153:33
>     |
> 153 |                 encode_internal(&*item, inner_schema, names, 
> enclosing_namespace, buffer)?;
>     |                                 ^^^^^^
>     |
>     = note: `-D clippy::borrow-deref-ref` implied by `-D clippy::all`
>     = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref
> help: if you would like to reborrow, try removing `&*`
>     |
> 153 |                 encode_internal(item, inner_schema, names, 
> enclosing_namespace, buffer)?;
>     |                                 ~~~~
> help: if you would like to deref, try using `&**`
>     |
> 153 |                 encode_internal(&**item, inner_schema, names, 
> enclosing_namespace, buffer)?;
>     |                                 ~~~~~~~error: you are deriving 
> `PartialEq` and can implement `Eq`
>    --> avro/src/schema.rs:581:24
>     |
> 581 | #[derive(Clone, Debug, PartialEq, EnumString)]
>     |                        ^^^^^^^^^ help: consider deriving `Eq` as well: 
> `PartialEq, Eq`
>     |
>     = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#derive_partial_eq_without_eqerror:
>  unneeded `return` statement
>    --> avro/src/types.rs:372:21
>     |
> 372 | /                     return Some(format!(
> 373 | |                         "Unresolved schema reference: '{}'. Parsed 
> names: {:?}",
> 374 | |                         name,
> 375 | |                         names.keys()
> 376 | |                     ));
>     | |_______________________^
>     |
>     = note: `-D clippy::needless-return` implied by `-D clippy::all`
>     = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
> help: remove `return`
>     |
> 372 ~                     Some(format!(
> 373 +                         "Unresolved schema reference: '{}'. Parsed 
> names: {:?}",
> 374 +                         name,
> 375 +                         names.keys()
> 376 +                     ))
>     |error: could not compile `apache-avro` due to 7 previous errors
> warning: build failed, waiting for other jobs to finish...
> error: could not compile `apache-avro` due to 7 previous errors
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to