Skip to content

Commit 4e2b3d2

Browse files
committed
chore: Allow and fix Clippy lints
1 parent d68f4ef commit 4e2b3d2

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

rust/operator-binary/src/crd/storage.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,24 @@ impl DataNodeStorageConfig {
9494
.join(",")
9595
}
9696

97-
/// Returns a list with the names of the pvcs to be used for nodes.
97+
/// Returns a list with the names of the PVCs to be used for nodes.
9898
/// The pvc names will be prefixed with the name given in the `pvc_name_prefix` argument.
9999
///
100100
/// There are two options when it comes to naming:
101-
/// 1. Name the pvcs `data-0, data-1, data-2, ... , data-{n-1}`
102-
/// ** Good, because consistent naming
103-
/// ** Bad, because existing deployments (using release 22.11 or earlier) will need to migrate their data by renaming their pvcs
101+
/// 1. Name the PVCs `data-0, data-1, data-2, ... , data-{n-1}`
102+
/// - Good, because consistent naming.
103+
/// - Bad, because existing deployments (using release 22.11 or earlier) will need to migrate
104+
/// their data by renaming their PVCs.
104105
///
105-
/// 2. Name the pvcs `data, data-1, data-2, ... , data-{n-1}`
106-
/// ** Good, if nodes only have a single pvc (which probably most of the deployments will have) they name of the pvc will be consistent with the name of all the other pvcs out there
107-
/// ** It is important that the first pvc will be called `data` (without suffix), regardless of the number of pvcs to be used. This is needed as nodes should be able to alter the number of pvcs attached and the use-case number of pvcs 1 -> 2 should be supported without renaming pvcs.
106+
/// 2. Name the PVCs `data, data-1, data-2, ... , data-{n-1}`
107+
/// - Good, if nodes only have a single pvc (which probably most of the deployments will have)
108+
/// they name of the pvc will be consistent with the name of all the other PVCs out there.
109+
/// - It is important that the first pvc will be called `data` (without suffix), regardless
110+
/// of the number of PVCs to be used. This is needed as nodes should be able to alter the
111+
/// number of PVCs attached and the use-case number of PVCs 1 -> 2 should be supported
112+
/// without renaming PVCs.
108113
///
109-
/// This function uses the 2. option.
114+
/// This function uses the second option.
110115
pub fn pvc_names(pvc_name_prefix: &str, number_of_pvcs: u16) -> Vec<String> {
111116
(0..number_of_pvcs)
112117
.map(|pvc_index| {

rust/operator-binary/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// TODO: Look into how to properly resolve `clippy::large_enum_variant`.
2+
// This will need changes in our and upstream error types.
3+
#![allow(clippy::result_large_err, clippy::large_enum_variant)]
4+
15
use std::sync::Arc;
26

37
use clap::Parser;

0 commit comments

Comments
 (0)