Skip to content

Commit 1b52066

Browse files
committed
Fix lints in new code
1 parent 5f5b857 commit 1b52066

10 files changed

Lines changed: 13 additions & 13 deletions

File tree

crates/stackable-operator/src/config_overrides.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,12 @@ impl JsonConfigOverrides {
105105
/// entirely and the user-provided string is parsed and returned.
106106
pub fn apply(&self, base: &serde_json::Value) -> Result<serde_json::Value, Error> {
107107
match self {
108-
JsonConfigOverrides::JsonMergePatch(patch) => {
108+
Self::JsonMergePatch(patch) => {
109109
let mut doc = base.clone();
110110
json_patch::merge(&mut doc, patch);
111111
Ok(doc)
112112
}
113-
JsonConfigOverrides::JsonPatches(patches) => {
113+
Self::JsonPatches(patches) => {
114114
let mut doc = base.clone();
115115
let operations: Vec<json_patch::PatchOperation> = patches
116116
.iter()
@@ -123,7 +123,7 @@ impl JsonConfigOverrides {
123123
json_patch::patch(&mut doc, &operations).context(ApplyJsonPatchSnafu)?;
124124
Ok(doc)
125125
}
126-
JsonConfigOverrides::UserProvided(content) => {
126+
Self::UserProvided(content) => {
127127
serde_json::from_str(content).context(ParseUserProvidedJsonSnafu)
128128
}
129129
}

crates/stackable-operator/src/database_connections/databases/derby.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub enum Error {
3131
/// Derby is an embedded, file-based Java database engine that requires no separate server process.
3232
/// It is typically used for development, testing, or as a lightweight metastore backend (e.g. for
3333
/// Apache Hive).
34-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
34+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
3535
#[serde(rename_all = "camelCase")]
3636
pub struct DerbyConnection {
3737
/// Path on the filesystem where Derby stores its database files.

crates/stackable-operator/src/database_connections/databases/mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub enum Error {
2020
}
2121

2222
/// Connection settings for a [MySQL](https://www.mysql.com/) database.
23-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
23+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
2424
#[serde(rename_all = "camelCase")]
2525
pub struct MysqlConnection {
2626
/// Hostname or IP address of the MySQL server.

crates/stackable-operator/src/database_connections/databases/postgresql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub enum Error {
2626
}
2727

2828
/// Connection settings for a [PostgreSQL](https://www.postgresql.org/) database.
29-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
29+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
3030
#[serde(rename_all = "camelCase")]
3131
pub struct PostgresqlConnection {
3232
/// Hostname or IP address of the PostgreSQL server.

crates/stackable-operator/src/database_connections/databases/redis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::{
1313
/// Connection settings for a [Redis](https://redis.io/) instance.
1414
///
1515
/// Redis is commonly used as a Celery message broker or result backend (e.g. for Apache Airflow).
16-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
16+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
1717
#[serde(rename_all = "camelCase")]
1818
pub struct RedisConnection {
1919
/// Hostname or IP address of the Redis server.

crates/stackable-operator/src/database_connections/drivers/celery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ impl CeleryDatabaseConnectionDetails {
8383
/// Use this when you need a Celery-compatible connection that does not have a first-class
8484
/// connection type. The complete connection URL is read from a Secret, giving the user full
8585
/// control over the connection string.
86-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
86+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
8787
#[serde(rename_all = "camelCase")]
8888
pub struct GenericCeleryDatabaseConnection {
8989
/// The name of the Secret that contains an `connectionUrl` key with the complete Celery URL.

crates/stackable-operator/src/database_connections/drivers/jdbc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl JdbcDatabaseConnectionDetails {
7171
/// Use this when you need to connect to a JDBC-compatible database that does not have a
7272
/// first-class connection type. You are responsible for providing the correct driver class name
7373
/// and a fully-formed JDBC URL as well as providing the needed classes on the Java classpath.
74-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
74+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
7575
#[serde(rename_all = "camelCase")]
7676
pub struct GenericJdbcDatabaseConnection {
7777
/// Fully-qualified Java class name of the JDBC driver, e.g. `org.postgresql.Driver` or

crates/stackable-operator/src/database_connections/drivers/sqlalchemy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl SqlAlchemyDatabaseConnectionDetails {
8282
/// Use this when you need to connect to a SQLAlchemy-compatible database that does not have a
8383
/// first-class connection type. The complete connection URL is read from a Secret, giving the user
8484
/// full control over the connection string including any driver-specific options.
85-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
85+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
8686
#[serde(rename_all = "camelCase")]
8787
pub struct GenericSqlAlchemyDatabaseConnection {
8888
/// The name of the Secret that contains an `connectionUrl` key with the complete SQLAlchemy URL.

crates/stackable-operator/src/product_config_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ mod tests {
718718
fn get_key_value_overrides(&self, file: &str) -> BTreeMap<String, Option<String>> {
719719
self.files
720720
.get(file)
721-
.map(|kv| kv.as_product_config_overrides())
721+
.map(KeyValueConfigOverrides::as_product_config_overrides)
722722
.unwrap_or_default()
723723
}
724724
}

crates/xtask/src/crd/dummy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl KeyValueOverridesProvider for DummyConfigOverrides {
5656
"dummy.properties" => self
5757
.dummy_properties
5858
.as_ref()
59-
.map(|o| o.as_product_config_overrides())
59+
.map(KeyValueConfigOverrides::as_product_config_overrides)
6060
.unwrap_or_default(),
6161
_ => BTreeMap::new(),
6262
}
@@ -162,7 +162,7 @@ pub mod versioned {
162162
UserInfoFetcher,
163163
}
164164

165-
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)]
165+
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
166166
#[serde(rename_all = "camelCase")]
167167
#[schemars(crate = "stackable_operator::schemars")]
168168
pub enum DummyDatabaseConnection {

0 commit comments

Comments
 (0)