Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3836

[Rust] Fix the build with Rust 1.65.0

    XMLWordPrintableJSON

Details

    Description

      The build of the Rust SDK fails with Rust 1.65.0 (the minimum supported rust version) with:

       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
      

      and

       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
      

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m