@@ -4,11 +4,10 @@ use anyhow::Result;
44use gpui:: { FontStyle , FontWeight , HighlightStyle , Hsla , WindowBackgroundAppearance } ;
55use indexmap:: IndexMap ;
66use palette:: FromColor ;
7- use schemars:: { JsonSchema , json_schema } ;
7+ use schemars:: { JsonSchema , JsonSchema_repr } ;
88use serde:: { Deserialize , Deserializer , Serialize } ;
99use serde_json:: Value ;
1010use serde_repr:: { Deserialize_repr , Serialize_repr } ;
11- use std:: borrow:: Cow ;
1211
1312use crate :: { StatusColorsRefinement , ThemeColorsRefinement } ;
1413
@@ -1486,7 +1485,7 @@ impl From<FontStyleContent> for FontStyle {
14861485 }
14871486}
14881487
1489- #[ derive( Debug , Clone , Copy , Serialize_repr , Deserialize_repr , PartialEq ) ]
1488+ #[ derive( Debug , Clone , Copy , Serialize_repr , Deserialize_repr , JsonSchema_repr , PartialEq ) ]
14901489#[ repr( u16 ) ]
14911490pub enum FontWeightContent {
14921491 Thin = 100 ,
@@ -1500,19 +1499,6 @@ pub enum FontWeightContent {
15001499 Black = 900 ,
15011500}
15021501
1503- impl JsonSchema for FontWeightContent {
1504- fn schema_name ( ) -> Cow < ' static , str > {
1505- "FontWeightContent" . into ( )
1506- }
1507-
1508- fn json_schema ( _: & mut schemars:: SchemaGenerator ) -> schemars:: Schema {
1509- json_schema ! ( {
1510- "type" : "integer" ,
1511- "enum" : [ 100 , 200 , 300 , 400 , 500 , 600 , 700 , 800 , 900 ]
1512- } )
1513- }
1514- }
1515-
15161502impl From < FontWeightContent > for FontWeight {
15171503 fn from ( value : FontWeightContent ) -> Self {
15181504 match value {
0 commit comments