Skip to content

Commit b6356d5

Browse files
committed
feat: rename PullPolicy to ComposePullPolicy
1 parent 1a182c8 commit b6356d5

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/command/compose/pull.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use async_trait::async_trait;
66

77
/// Pull policy for compose pull command
88
#[derive(Debug, Clone, Copy)]
9-
pub enum PullPolicy {
9+
pub enum ComposePullPolicy {
1010
/// Always pull images
1111
Always,
1212
/// Pull missing images only
1313
Missing,
1414
}
1515

16-
impl std::fmt::Display for PullPolicy {
16+
impl std::fmt::Display for ComposePullPolicy {
1717
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
1818
match self {
1919
Self::Always => write!(f, "always"),
@@ -39,7 +39,7 @@ pub struct ComposePullCommand {
3939
/// Also pull services declared as dependencies
4040
pub include_deps: bool,
4141
/// Pull policy
42-
pub policy: Option<PullPolicy>,
42+
pub policy: Option<ComposePullPolicy>,
4343
/// Pull without printing progress information
4444
pub quiet: bool,
4545
}
@@ -114,7 +114,7 @@ impl ComposePullCommand {
114114

115115
/// Set pull policy
116116
#[must_use]
117-
pub fn policy(mut self, policy: PullPolicy) -> Self {
117+
pub fn policy(mut self, policy: ComposePullPolicy) -> Self {
118118
self.policy = Some(policy);
119119
self
120120
}
@@ -253,7 +253,7 @@ mod tests {
253253
#[test]
254254
fn test_compose_pull_with_policy() {
255255
let cmd = ComposePullCommand::new()
256-
.policy(PullPolicy::Always)
256+
.policy(ComposePullPolicy::Always)
257257
.service("db");
258258

259259
let args = cmd.build_subcommand_args();
@@ -264,7 +264,7 @@ mod tests {
264264

265265
#[test]
266266
fn test_compose_pull_with_missing_policy() {
267-
let cmd = ComposePullCommand::new().policy(PullPolicy::Missing);
267+
let cmd = ComposePullCommand::new().policy(ComposePullPolicy::Missing);
268268

269269
let args = cmd.build_subcommand_args();
270270
assert!(args.contains(&"--policy".to_string()));

0 commit comments

Comments
 (0)