@@ -9,7 +9,7 @@ use std::fs;
9
9
use std:: path:: PathBuf ;
10
10
11
11
/// The root struct of a frame configuration.
12
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
12
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
13
13
pub struct FrameConfig {
14
14
pub codegen : CodeGenConfig ,
15
15
}
@@ -48,30 +48,30 @@ impl FrameConfig {
48
48
}
49
49
50
50
/// Configuration options related to code generation.
51
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
51
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
52
52
pub struct CodeGenConfig {
53
53
pub common : CommonConfig ,
54
54
pub rust : RustConfig ,
55
55
pub smcat : SmcatConfig ,
56
56
}
57
57
58
58
/// Code generation options shared among all backends.
59
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
59
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
60
60
pub struct CommonConfig {
61
61
pub features : CommonFeatures ,
62
62
pub code : CommonCode ,
63
63
}
64
64
65
65
/// Code generation features shared among all backends.
66
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
66
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
67
67
pub struct CommonFeatures { }
68
68
69
69
/// Naming options for generated code shared among all backends.
70
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
70
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
71
71
pub struct CommonCode { }
72
72
73
73
/// Code generation options specific to the Rust backend.
74
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
74
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
75
75
pub struct RustConfig {
76
76
pub features : RustFeatures ,
77
77
pub code : RustCode ,
@@ -222,14 +222,14 @@ impl RustRuntime {
222
222
}
223
223
224
224
/// Code generation options specific to the Smcat backend.
225
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
225
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
226
226
pub struct SmcatConfig {
227
227
pub features : SmcatFeatures ,
228
228
pub code : SmcatCode ,
229
229
}
230
230
231
231
/// Code generation features specific to the Smcat backend.
232
- #[ derive( Clone , Debug , PartialEq , Eq , Serialize , Deserialize ) ]
232
+ #[ derive( Clone , Debug , Default , PartialEq , Eq , Serialize , Deserialize ) ]
233
233
pub struct SmcatFeatures { }
234
234
235
235
/// Style options for generated code specific to the Smcat backend.
@@ -365,55 +365,6 @@ impl Provider for SystemNode {
365
365
366
366
// Defaults
367
367
368
- impl Default for FrameConfig {
369
- fn default ( ) -> Self {
370
- FrameConfig {
371
- codegen : CodeGenConfig :: default ( ) ,
372
- }
373
- }
374
- }
375
-
376
- impl Default for CodeGenConfig {
377
- fn default ( ) -> Self {
378
- CodeGenConfig {
379
- common : CommonConfig :: default ( ) ,
380
- rust : RustConfig :: default ( ) ,
381
- smcat : SmcatConfig :: default ( ) ,
382
- }
383
- }
384
- }
385
-
386
- impl Default for CommonConfig {
387
- fn default ( ) -> Self {
388
- CommonConfig {
389
- features : CommonFeatures :: default ( ) ,
390
- code : CommonCode :: default ( ) ,
391
- }
392
- }
393
- }
394
-
395
- impl Default for CommonFeatures {
396
- fn default ( ) -> Self {
397
- CommonFeatures { }
398
- }
399
- }
400
-
401
- impl Default for CommonCode {
402
- fn default ( ) -> Self {
403
- CommonCode { }
404
- }
405
- }
406
-
407
- impl Default for RustConfig {
408
- fn default ( ) -> Self {
409
- RustConfig {
410
- features : RustFeatures :: default ( ) ,
411
- code : RustCode :: default ( ) ,
412
- runtime : RustRuntime :: default ( ) ,
413
- }
414
- }
415
- }
416
-
417
368
impl Default for RustFeatures {
418
369
fn default ( ) -> Self {
419
370
RustFeatures {
@@ -504,21 +455,6 @@ impl Default for RustRuntime {
504
455
}
505
456
}
506
457
507
- impl Default for SmcatConfig {
508
- fn default ( ) -> Self {
509
- SmcatConfig {
510
- features : SmcatFeatures :: default ( ) ,
511
- code : SmcatCode :: default ( ) ,
512
- }
513
- }
514
- }
515
-
516
- impl Default for SmcatFeatures {
517
- fn default ( ) -> Self {
518
- SmcatFeatures { }
519
- }
520
- }
521
-
522
458
impl Default for SmcatCode {
523
459
fn default ( ) -> Self {
524
460
SmcatCode {
0 commit comments