Skip to content
Snippets Groups Projects
Commit 555e544f authored by Georges Racinet's avatar Georges Racinet
Browse files

RHGitaly: fixed Clippy warnings

Some warnings have been fixed lower in the stack. However, the
Camel Case rule for acronyms hurts my eyes in the case of TCP
(and leads to plain wrong output when it ends up in startup logs
through `fmt::Debug`).

We had to change the way the generated code is included. This also
has the nice effect of ignoring `gitaly.rs` in `rustfmt`, thus making
`cargo fmt --check` work for us.

The missing `Eq` impl when deriving `PartialEq` is new in Rust 1.63
parent 8a82701d
No related branches found
No related tags found
3 merge requests!151heptapod#743: making 0.36 the new stable,!144RHGitaly: implement CommitService.ListCommitsByOid,!140Bootstrapping RHGitaly
# MSRV is as Mercurial's, defined as the version in Debian testing
# (currrently bookworm)
msrv = "1.61"
......@@ -9,8 +9,11 @@
// The generated module is derived from the Protobuf "package" name
// Hence as soon as we start compiling the HGitaly-specific proto files,
// we'll also get a `hgitaly` module.
#[path = "generated/gitaly.rs"]
pub mod gitaly;
// using `include!` lets us add attributes, in this case to control clippy
pub mod gitaly {
#![allow(unknown_lints)]
include! {"generated/gitaly.rs"}
}
pub mod config;
pub mod repository;
......
......@@ -28,6 +28,7 @@
}
#[derive(Debug)]
#[allow(clippy::upper_case_acronyms)]
enum BindAddress {
Unix(PathBuf),
TCP(SocketAddr),
......
......@@ -9,7 +9,7 @@
use super::config::Config;
use super::gitaly::Repository;
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
pub enum PathError {
UnknownStorage(String),
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment