Skip to content

Commit 96b431c

Browse files
committed
rename field for consistency
1 parent 05fbbce commit 96b431c

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

application/src/models.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl FromStr for ServerPowerAction {
3333
#[derive(ToSchema, Default, Debug, Clone, Copy, Deserialize, Serialize, PartialEq, Eq)]
3434
#[serde(rename_all = "snake_case")]
3535
#[schema(rename_all = "snake_case")]
36-
pub enum ServerAutostartBehavior {
36+
pub enum ServerAutoStartBehavior {
3737
Always,
3838
#[default]
3939
UnlessStopped,

application/src/server/configuration/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ nestify::nest! {
125125
},
126126

127127
#[serde(default)]
128-
pub autostart_behavior: crate::models::ServerAutostartBehavior,
128+
pub auto_start_behavior: crate::models::ServerAutoStartBehavior,
129129
}
130130
}
131131

application/src/server/manager.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ impl ServerManager {
121121
}
122122

123123
let do_autostart =
124-
match server.configuration.read().await.autostart_behavior {
125-
crate::models::ServerAutostartBehavior::Always => true,
126-
crate::models::ServerAutostartBehavior::UnlessStopped => {
124+
match server.configuration.read().await.auto_start_behavior {
125+
crate::models::ServerAutoStartBehavior::Always => true,
126+
crate::models::ServerAutoStartBehavior::UnlessStopped => {
127127
matches!(state, ServerState::Running | ServerState::Starting)
128128
}
129-
crate::models::ServerAutostartBehavior::Never => false,
129+
crate::models::ServerAutoStartBehavior::Never => false,
130130
};
131131

132132
tokio::time::sleep(std::time::Duration::from_secs(5)).await;

0 commit comments

Comments
 (0)