Skip to content

Commit 0fac8fb

Browse files
committed
style: fix enum variants formatting to follow linting convention
Add missing line breaks between enum variants in CloudInitContextError and CommandError enums to follow the linting guide convention that requires blank lines between error enum variants for better readability. Files changed: - src/infrastructure/template/wrappers/tofu/lxd/cloud_init/context.rs - src/shared/executor.rs - docs/linting.md (documentation example fix)
1 parent 083c04b commit 0fac8fb

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

docs/linting.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ Error enum variants should be separated by blank lines for better readability.
6565
pub enum CloudInitContextError {
6666
#[error("SSH public key is required but not provided")]
6767
MissingSshPublicKey,
68+
6869
#[error("Failed to read SSH public key from file: {0}")]
6970
SshPublicKeyReadError(String),
7071
}

src/infrastructure/template/wrappers/tofu/lxd/cloud_init/context.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ use crate::shared::Username;
1515
pub enum CloudInitContextError {
1616
#[error("SSH public key is required but not provided")]
1717
MissingSshPublicKey,
18+
1819
#[error("Username is required but not provided")]
1920
MissingUsername,
21+
2022
#[error("Invalid username: {0}")]
2123
InvalidUsername(String),
24+
2225
#[error("Failed to read SSH public key from file: {0}")]
2326
SshPublicKeyReadError(String),
2427
}

src/shared/executor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub enum CommandError {
2626
#[source]
2727
source: std::io::Error,
2828
},
29+
2930
/// The command was started but exited with a non-zero status code
3031
#[error(
3132
"Command '{command}' failed with exit code {exit_code}\nStdout: {stdout}\nStderr: {stderr}"

0 commit comments

Comments
 (0)