diff --git a/rust/rhgitaly/clippy.toml b/rust/rhgitaly/clippy.toml new file mode 100644 index 0000000000000000000000000000000000000000..555e544f724443f5e405c2de74b4edc4f1250204_cnVzdC9yaGdpdGFseS9jbGlwcHkudG9tbA== --- /dev/null +++ b/rust/rhgitaly/clippy.toml @@ -0,0 +1,3 @@ +# MSRV is as Mercurial's, defined as the version in Debian testing +# (currrently bookworm) +msrv = "1.61" diff --git a/rust/rhgitaly/src/lib.rs b/rust/rhgitaly/src/lib.rs index 8a82701d0b1735a1c9af92adc31ed23aa8477eba_cnVzdC9yaGdpdGFseS9zcmMvbGliLnJz..555e544f724443f5e405c2de74b4edc4f1250204_cnVzdC9yaGdpdGFseS9zcmMvbGliLnJz 100644 --- a/rust/rhgitaly/src/lib.rs +++ b/rust/rhgitaly/src/lib.rs @@ -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; diff --git a/rust/rhgitaly/src/main.rs b/rust/rhgitaly/src/main.rs index 8a82701d0b1735a1c9af92adc31ed23aa8477eba_cnVzdC9yaGdpdGFseS9zcmMvbWFpbi5ycw==..555e544f724443f5e405c2de74b4edc4f1250204_cnVzdC9yaGdpdGFseS9zcmMvbWFpbi5ycw== 100644 --- a/rust/rhgitaly/src/main.rs +++ b/rust/rhgitaly/src/main.rs @@ -28,6 +28,7 @@ } #[derive(Debug)] +#[allow(clippy::upper_case_acronyms)] enum BindAddress { Unix(PathBuf), TCP(SocketAddr), diff --git a/rust/rhgitaly/src/repository.rs b/rust/rhgitaly/src/repository.rs index 8a82701d0b1735a1c9af92adc31ed23aa8477eba_cnVzdC9yaGdpdGFseS9zcmMvcmVwb3NpdG9yeS5ycw==..555e544f724443f5e405c2de74b4edc4f1250204_cnVzdC9yaGdpdGFseS9zcmMvcmVwb3NpdG9yeS5ycw== 100644 --- a/rust/rhgitaly/src/repository.rs +++ b/rust/rhgitaly/src/repository.rs @@ -9,7 +9,7 @@ use super::config::Config; use super::gitaly::Repository; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum PathError { UnknownStorage(String), }