@@ -48,9 +48,10 @@ const DEFAULT_NUM_WORKERS: u32 = 10;
4848const SUPPORTED_GRAPH_FILE_EXTENSIONS : [ & str ; 8 ] =
4949 [ "svg" , "png" , "jpg" , "pdf" , "json" , "html" , "mermaid" , "dot" ] ;
5050
51- #[ derive( Copy , Clone , Debug , PartialEq , Eq , ValueEnum , Deserializable , Serialize ) ]
51+ #[ derive( Copy , Clone , Debug , Default , PartialEq , Eq , ValueEnum , Deserializable , Serialize ) ]
5252pub enum OutputLogsMode {
5353 #[ serde( rename = "full" ) ]
54+ #[ default]
5455 Full ,
5556 #[ serde( rename = "none" ) ]
5657 None ,
@@ -62,12 +63,6 @@ pub enum OutputLogsMode {
6263 ErrorsOnly ,
6364}
6465
65- impl Default for OutputLogsMode {
66- fn default ( ) -> Self {
67- Self :: Full
68- }
69- }
70-
7166impl Display for OutputLogsMode {
7267 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
7368 f. write_str ( match self {
@@ -92,22 +87,17 @@ impl From<OutputLogsMode> for turborepo_ui::tui::event::OutputLogs {
9287 }
9388}
9489
95- #[ derive( Copy , Clone , Debug , PartialEq , Serialize , ValueEnum , Deserialize , Eq ) ]
90+ #[ derive( Copy , Clone , Debug , Default , PartialEq , Serialize , ValueEnum , Deserialize , Eq ) ]
9691pub enum LogOrder {
9792 #[ serde( rename = "auto" ) ]
93+ #[ default]
9894 Auto ,
9995 #[ serde( rename = "stream" ) ]
10096 Stream ,
10197 #[ serde( rename = "grouped" ) ]
10298 Grouped ,
10399}
104100
105- impl Default for LogOrder {
106- fn default ( ) -> Self {
107- Self :: Auto
108- }
109- }
110-
111101impl Display for LogOrder {
112102 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
113103 f. write_str ( match self {
@@ -1162,22 +1152,17 @@ impl RunArgs {
11621152 }
11631153}
11641154
1165- #[ derive( ValueEnum , Clone , Copy , Debug , PartialEq , Serialize ) ]
1155+ #[ derive( ValueEnum , Clone , Copy , Debug , Default , PartialEq , Serialize ) ]
11661156pub enum LogPrefix {
11671157 #[ serde( rename = "auto" ) ]
1158+ #[ default]
11681159 Auto ,
11691160 #[ serde( rename = "none" ) ]
11701161 None ,
11711162 #[ serde( rename = "task" ) ]
11721163 Task ,
11731164}
11741165
1175- impl Default for LogPrefix {
1176- fn default ( ) -> Self {
1177- Self :: Auto
1178- }
1179- }
1180-
11811166impl Display for LogPrefix {
11821167 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
11831168 match self {
0 commit comments