You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/08/12 07:42:00 UTC
[jira] [Work logged] (AVRO-3608) Rust: Fix clippy errors in Rust 1.63.0
[ https://issues.apache.org/jira/browse/AVRO-3608?focusedWorklogId=800202&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-800202 ]
ASF GitHub Bot logged work on AVRO-3608:
----------------------------------------
Author: ASF GitHub Bot
Created on: 12/Aug/22 07:41
Start Date: 12/Aug/22 07:41
Worklog Time Spent: 10m
Work Description: martin-g opened a new pull request, #1825:
URL: https://github.com/apache/avro/pull/1825
### Jira
- [X] https://issues.apache.org/jira/browse/AVRO-3608
### Tests
- [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
### Commits
- [X] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [ ] In case of new functionality, my PR adds documentation that describes how to use it.
- All the public functions and the classes in the PR contain Javadoc that explain what it does
Issue Time Tracking
-------------------
Worklog Id: (was: 800202)
Remaining Estimate: 0h
Time Spent: 10m
> 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
> Time Spent: 10m
> 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)