5
5
use crate :: naples:: ParameterTokenConfig ;
6
6
use crate :: ondisk:: ENTRY_HEADER ;
7
7
use crate :: ondisk:: {
8
- take_header_from_collection, take_header_from_collection_mut,
9
8
BoardInstances , ContextFormat , ContextType , EntryCompatible , EntryId ,
10
9
HeaderWithTail , MutSequenceElementFromBytes , PriorityLevels ,
11
- SequenceElementFromBytes ,
10
+ SequenceElementFromBytes , take_header_from_collection,
11
+ take_header_from_collection_mut,
12
12
} ;
13
13
use crate :: ondisk:: { Parameters , ParametersIter } ;
14
14
use crate :: tokens_entry:: TokensEntryBodyItem ;
@@ -198,11 +198,7 @@ impl<'a, T: EntryCompatible + MutSequenceElementFromBytes<'a>> Iterator
198
198
type Item = T ;
199
199
fn next ( & ' _ mut self ) -> Option < Self :: Item > {
200
200
// Note: Further error checking is done in validate()
201
- if self . buf . is_empty ( ) {
202
- None
203
- } else {
204
- self . next1 ( ) . ok ( )
205
- }
201
+ if self . buf . is_empty ( ) { None } else { self . next1 ( ) . ok ( ) }
206
202
}
207
203
}
208
204
@@ -428,7 +424,7 @@ impl<'a> schemars::JsonSchema for EntryItem<'a> {
428
424
String :: from ( "EntryItem" )
429
425
}
430
426
fn json_schema (
431
- gen : & mut schemars:: gen:: SchemaGenerator ,
427
+ generator : & mut schemars:: r# gen:: SchemaGenerator ,
432
428
) -> schemars:: schema:: Schema {
433
429
use crate :: fch;
434
430
use crate :: gnb;
@@ -441,152 +437,162 @@ impl<'a> schemars::JsonSchema for EntryItem<'a> {
441
437
} ;
442
438
let obj = schema. object ( ) ;
443
439
obj. required . insert ( "header" . to_owned ( ) ) ;
444
- obj. properties
445
- . insert ( "header" . to_owned ( ) , <ENTRY_HEADER >:: json_schema ( gen) ) ;
440
+ obj. properties . insert (
441
+ "header" . to_owned ( ) ,
442
+ <ENTRY_HEADER >:: json_schema ( generator) ,
443
+ ) ;
446
444
obj. properties . insert (
447
445
"tokens" . to_owned ( ) ,
448
- <Vec < TokensEntryItem < & ' _ TOKEN_ENTRY > > >:: json_schema ( gen ) ,
446
+ <Vec < TokensEntryItem < & ' _ TOKEN_ENTRY > > >:: json_schema ( generator ) ,
449
447
) ;
450
448
obj. properties . insert (
451
449
"LrdimmDdr4OdtPatElement" . to_owned ( ) ,
452
- <Vec < memory:: LrdimmDdr4OdtPatElement > >:: json_schema ( gen ) ,
450
+ <Vec < memory:: LrdimmDdr4OdtPatElement > >:: json_schema ( generator ) ,
453
451
) ;
454
452
obj. properties . insert (
455
453
"Ddr4OdtPatElement" . to_owned ( ) ,
456
- <Vec < memory:: Ddr4OdtPatElement > >:: json_schema ( gen ) ,
454
+ <Vec < memory:: Ddr4OdtPatElement > >:: json_schema ( generator ) ,
457
455
) ;
458
456
obj. properties . insert (
459
457
"DdrPostPackageRepairElement" . to_owned ( ) ,
460
- <Vec < memory:: DdrPostPackageRepairElement > >:: json_schema ( gen ) ,
458
+ <Vec < memory:: DdrPostPackageRepairElement > >:: json_schema ( generator ) ,
461
459
) ;
462
460
obj. properties . insert (
463
461
"DimmInfoSmbusElement" . to_owned ( ) ,
464
- <Vec < memory:: DimmInfoSmbusElement > >:: json_schema ( gen ) ,
462
+ <Vec < memory:: DimmInfoSmbusElement > >:: json_schema ( generator ) ,
465
463
) ;
466
464
obj. properties . insert (
467
465
"RdimmDdr4CadBusElement" . to_owned ( ) ,
468
- <Vec < memory:: RdimmDdr4CadBusElement > >:: json_schema ( gen ) ,
466
+ <Vec < memory:: RdimmDdr4CadBusElement > >:: json_schema ( generator ) ,
469
467
) ;
470
468
obj. properties . insert (
471
469
"UdimmDdr4CadBusElement" . to_owned ( ) ,
472
- <Vec < memory:: UdimmDdr4CadBusElement > >:: json_schema ( gen ) ,
470
+ <Vec < memory:: UdimmDdr4CadBusElement > >:: json_schema ( generator ) ,
473
471
) ;
474
472
obj. properties . insert (
475
473
"LrdimmDdr4CadBusElement" . to_owned ( ) ,
476
- <Vec < memory:: LrdimmDdr4CadBusElement > >:: json_schema ( gen ) ,
474
+ <Vec < memory:: LrdimmDdr4CadBusElement > >:: json_schema ( generator ) ,
477
475
) ;
478
476
obj. properties . insert (
479
477
"Ddr4DataBusElement" . to_owned ( ) ,
480
- <Vec < memory:: Ddr4DataBusElement > >:: json_schema ( gen ) ,
478
+ <Vec < memory:: Ddr4DataBusElement > >:: json_schema ( generator ) ,
481
479
) ;
482
480
obj. properties . insert (
483
481
"LrdimmDdr4DataBusElement" . to_owned ( ) ,
484
- <Vec < memory:: LrdimmDdr4DataBusElement > >:: json_schema ( gen ) ,
482
+ <Vec < memory:: LrdimmDdr4DataBusElement > >:: json_schema ( generator ) ,
485
483
) ;
486
484
obj. properties . insert (
487
485
"MaxFreqElement" . to_owned ( ) ,
488
- <Vec < memory:: MaxFreqElement > >:: json_schema ( gen ) ,
486
+ <Vec < memory:: MaxFreqElement > >:: json_schema ( generator ) ,
489
487
) ;
490
488
obj. properties . insert (
491
489
"LrMaxFreqElement" . to_owned ( ) ,
492
- <Vec < memory:: LrMaxFreqElement > >:: json_schema ( gen ) ,
490
+ <Vec < memory:: LrMaxFreqElement > >:: json_schema ( generator ) ,
493
491
) ;
494
492
obj. properties . insert (
495
493
"Ddr5CaPinMapElement" . to_owned ( ) ,
496
- <Vec < memory:: Ddr5CaPinMapElement > >:: json_schema ( gen ) ,
494
+ <Vec < memory:: Ddr5CaPinMapElement > >:: json_schema ( generator ) ,
497
495
) ;
498
496
obj. properties . insert (
499
497
"MemDfeSearchElement32" . to_owned ( ) ,
500
- <Vec < memory:: MemDfeSearchElement32 > >:: json_schema ( gen ) ,
498
+ <Vec < memory:: MemDfeSearchElement32 > >:: json_schema ( generator ) ,
501
499
) ;
502
500
obj. properties . insert (
503
501
"MemDfeSearchElement36" . to_owned ( ) ,
504
- <Vec < memory:: MemDfeSearchElement36 > >:: json_schema ( gen ) ,
502
+ <Vec < memory:: MemDfeSearchElement36 > >:: json_schema ( generator ) ,
505
503
) ;
506
504
obj. properties . insert (
507
505
"DdrDqPinMapElement" . to_owned ( ) ,
508
- <Vec < memory:: DdrDqPinMapElement > >:: json_schema ( gen ) ,
506
+ <Vec < memory:: DdrDqPinMapElement > >:: json_schema ( generator ) ,
509
507
) ;
510
508
obj. properties . insert (
511
509
"RdimmDdr5BusElement" . to_owned ( ) ,
512
- <Vec < memory:: RdimmDdr5BusElement > >:: json_schema ( gen ) ,
510
+ <Vec < memory:: RdimmDdr5BusElement > >:: json_schema ( generator ) ,
513
511
) ;
514
512
obj. properties . insert (
515
513
"ConsoleOutControl" . to_owned ( ) ,
516
- <memory:: ConsoleOutControl >:: json_schema ( gen ) ,
514
+ <memory:: ConsoleOutControl >:: json_schema ( generator ) ,
517
515
) ;
518
516
obj. properties . insert (
519
517
"NaplesConsoleOutControl" . to_owned ( ) ,
520
- <memory:: NaplesConsoleOutControl >:: json_schema ( gen ) ,
518
+ <memory:: NaplesConsoleOutControl >:: json_schema ( generator ) ,
521
519
) ;
522
520
obj. properties . insert (
523
521
"ExtVoltageControl" . to_owned ( ) ,
524
- <memory:: ExtVoltageControl >:: json_schema ( gen ) ,
522
+ <memory:: ExtVoltageControl >:: json_schema ( generator ) ,
525
523
) ;
526
524
obj. properties . insert (
527
525
"ErrorOutControl116" . to_owned ( ) ,
528
- <memory:: ErrorOutControl116 >:: json_schema ( gen ) ,
526
+ <memory:: ErrorOutControl116 >:: json_schema ( generator ) ,
529
527
) ;
530
528
obj. properties . insert (
531
529
"ErrorOutControl112" . to_owned ( ) ,
532
- <memory:: ErrorOutControl112 >:: json_schema ( gen ) ,
530
+ <memory:: ErrorOutControl112 >:: json_schema ( generator ) ,
533
531
) ;
534
532
obj. properties . insert (
535
533
"SlinkConfig" . to_owned ( ) ,
536
- <crate :: df:: SlinkConfig >:: json_schema ( gen) ,
534
+ <crate :: df:: SlinkConfig >:: json_schema ( generator) ,
535
+ ) ;
536
+ obj. properties . insert (
537
+ "EspiInit" . to_owned ( ) ,
538
+ <fch:: EspiInit >:: json_schema ( generator) ,
537
539
) ;
538
- obj. properties
539
- . insert ( "EspiInit" . to_owned ( ) , <fch:: EspiInit >:: json_schema ( gen) ) ;
540
540
obj. properties . insert (
541
541
"PmuBistVendorAlgorithmElement" . to_owned ( ) ,
542
- <Vec < memory:: PmuBistVendorAlgorithmElement > >:: json_schema ( gen) ,
542
+ <Vec < memory:: PmuBistVendorAlgorithmElement > >:: json_schema (
543
+ generator,
544
+ ) ,
543
545
) ;
544
546
obj. properties . insert (
545
547
"Ddr5RawCardConfigElement" . to_owned ( ) ,
546
- <Vec < memory:: Ddr5RawCardConfigElement > >:: json_schema ( gen ) ,
548
+ <Vec < memory:: Ddr5RawCardConfigElement > >:: json_schema ( generator ) ,
547
549
) ;
548
550
obj. properties . insert (
549
551
"EspiSioInitElement" . to_owned ( ) ,
550
- <Vec < fch:: EspiSioInitElement > >:: json_schema ( gen ) ,
552
+ <Vec < fch:: EspiSioInitElement > >:: json_schema ( generator ) ,
551
553
) ;
552
554
obj. properties . insert (
553
555
"EarlyPcieConfigElement" . to_owned ( ) ,
554
- <Vec < gnb:: EarlyPcieConfigElement > >:: json_schema ( gen ) ,
556
+ <Vec < gnb:: EarlyPcieConfigElement > >:: json_schema ( generator ) ,
555
557
) ;
556
558
obj. properties
557
559
. insert ( "BoardIdGettingMethodGpio" . to_owned ( ) ,
558
560
<( psp:: BoardIdGettingMethodGpio ,
559
561
Vec < <psp:: BoardIdGettingMethodGpio as
560
- HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( gen ) ) ;
562
+ HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( generator ) ) ;
561
563
obj. properties
562
564
. insert ( "BoardIdGettingMethodEeprom" . to_owned ( ) ,
563
565
<( psp:: BoardIdGettingMethodEeprom ,
564
566
Vec < <psp:: BoardIdGettingMethodEeprom as
565
- HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( gen ) ) ;
567
+ HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( generator ) ) ;
566
568
obj. properties
567
569
. insert ( "BoardIdGettingMethodSmbus" . to_owned ( ) ,
568
570
<( psp:: BoardIdGettingMethodSmbus ,
569
571
Vec < <psp:: BoardIdGettingMethodSmbus as
570
- HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( gen ) ) ;
572
+ HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( generator ) ) ;
571
573
obj. properties
572
574
. insert ( "BoardIdGettingMethodCustom" . to_owned ( ) ,
573
575
<( psp:: BoardIdGettingMethodCustom ,
574
576
Vec < <psp:: BoardIdGettingMethodCustom as
575
- HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( gen ) ) ;
577
+ HeaderWithTail >:: TailArrayItemType < ' _ > > ) >:: json_schema ( generator ) ) ;
576
578
577
579
obj. properties . insert (
578
580
"platform_specific_overrides" . to_owned ( ) ,
579
581
<Vec < memory:: platform_specific_override:: ElementRef < ' _ > > >:: json_schema (
580
- gen ,
582
+ generator ,
581
583
) ,
582
584
) ;
583
585
obj. properties . insert (
584
586
"platform_tuning" . to_owned ( ) ,
585
- <Vec < memory:: platform_tuning:: ElementRef < ' _ > > >:: json_schema ( gen) ,
587
+ <Vec < memory:: platform_tuning:: ElementRef < ' _ > > >:: json_schema (
588
+ generator,
589
+ ) ,
586
590
) ;
587
591
588
- obj. properties
589
- . insert ( "parameters" . to_owned ( ) , <Parameters >:: json_schema ( gen) ) ;
592
+ obj. properties . insert (
593
+ "parameters" . to_owned ( ) ,
594
+ <Parameters >:: json_schema ( generator) ,
595
+ ) ;
590
596
schema. into ( )
591
597
}
592
598
}
@@ -596,9 +602,9 @@ impl schemars::JsonSchema for SerdeEntryItem {
596
602
EntryItem :: schema_name ( )
597
603
}
598
604
fn json_schema (
599
- gen : & mut schemars:: gen:: SchemaGenerator ,
605
+ generator : & mut schemars:: r# gen:: SchemaGenerator ,
600
606
) -> schemars:: schema:: Schema {
601
- EntryItem :: json_schema ( gen )
607
+ EntryItem :: json_schema ( generator )
602
608
}
603
609
fn is_referenceable ( ) -> bool {
604
610
EntryItem :: is_referenceable ( )
0 commit comments