[ 
https://issues.apache.org/jira/browse/AVRO-3836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17755969#comment-17755969
 ] 

ASF subversion and git services commented on AVRO-3836:
-------------------------------------------------------

Commit 9c0ebe6515a0d76889de2fbd845917d663535864 in avro's branch 
refs/heads/avro-3836-fix-build-with-rust-1.65.0 from Martin Tzvetanov Grigorov
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=9c0ebe651 ]

AVRO-3836: [Rust] Fix the build with Rust 1.65.0

Fix clippy issues with Rust 1.65.0

Run clippy also for MSRV

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>


> [Rust] Fix the build with Rust 1.65.0
> -------------------------------------
>
>                 Key: AVRO-3836
>                 URL: https://issues.apache.org/jira/browse/AVRO-3836
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: rust
>            Reporter: Martin Tzvetanov Grigorov
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Major
>
> The build of the Rust SDK fails with Rust 1.65.0 (the minimum supported rust 
> version) with:
> {code:java}
>  error: use of `or` followed by a function call
>    --> avro/src/schema.rs:264:57
>     |
> 264 |                 .or_else(|| 
> complex.string("namespace").or(enclosing_namespace.clone()))
>     |                                                         
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| 
> enclosing_namespace.clone())`
>     |
>     = note: `-D clippy::or-fun-call` implied by `-D clippy::all`
>     = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_callerror: 
> redundant clone
>     --> avro/src/schema.rs:1427:40
>      |
> 1427 |         let fully_qualified_name = name.clone();
>      |                                        ^^^^^^^^ help: remove this
>      |
>      = note: `-D clippy::redundant-clone` implied by `-D clippy::all`
> note: this value is dropped without further use
>     --> avro/src/schema.rs:1427:36
>      |
> 1427 |         let fully_qualified_name = name.clone();
>      |                                    ^^^^
>      = help: for further information visit 
> https://rust-lang.github.io/rust-clippy/master/index.html#redundant_cloneerror:
>  could not compile `apache-avro` due to 2 previous errors
> warning: build failed, waiting for other jobs to finish...
> error: could not compile `apache-avro` due to 2 previous errors
> {code}
> and
> {code:java}
>  error: you are deriving `PartialEq` and can implement `Eq`
>     --> avro/tests/schema.rs:1456:52
>      |
> 1456 |     #[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
>      |                                                    ^^^^^^^^^ 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:
>  could not compile `apache-avro` due to previous error
> {code}



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

Reply via email to