forked from mirrors/jj
cli: remove unneeded Display for SparseInheritance
Since it's a ValueEnum, clap knows how to stringify the default value.
This commit is contained in:
parent
b263882e4b
commit
5bae3eaa74
1 changed files with 1 additions and 12 deletions
|
@ -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<RevisionArg>,
|
||||
/// 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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue