diff --git a/cli/src/commands/workspace/add.rs b/cli/src/commands/workspace/add.rs index 92f347d451..8cd640b096 100644 --- a/cli/src/commands/workspace/add.rs +++ b/cli/src/commands/workspace/add.rs @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::fmt::Display; use std::fs; use itertools::Itertools; @@ -43,16 +42,6 @@ enum SparseInheritance { Empty, } -impl Display for SparseInheritance { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - SparseInheritance::Copy => write!(f, "copy"), - SparseInheritance::Full => write!(f, "full"), - SparseInheritance::Empty => write!(f, "empty"), - } - } -} - /// Add a workspace /// /// By default, the new workspace inherits the sparse patterns of the current @@ -82,7 +71,7 @@ pub struct WorkspaceAddArgs { #[arg(long, short)] revision: Vec, /// How to handle sparse patterns when creating a new workspace. - #[arg(long, default_value_t=SparseInheritance::Copy)] + #[arg(long, value_enum, default_value_t = SparseInheritance::Copy)] sparse_patterns: SparseInheritance, }