From 3a2b4259983746dcfa86bf965c76e42b92f5c710 Mon Sep 17 00:00:00 2001 From: Graham Esau Date: Thu, 25 Mar 2021 22:56:25 +0000 Subject: [PATCH] Make docs examples a tiny bit prettier --- docs/_includes/examples/enum_repr.rs | 1 + docs/_sass/custom/custom.scss | 5 +++++ schemars/examples/enum_repr.rs | 1 + 3 files changed, 7 insertions(+) diff --git a/docs/_includes/examples/enum_repr.rs b/docs/_includes/examples/enum_repr.rs index 671bc46..3b0df97 100644 --- a/docs/_includes/examples/enum_repr.rs +++ b/docs/_includes/examples/enum_repr.rs @@ -8,6 +8,7 @@ enum SmallPrime { Five = 5, Seven = 7, } + fn main() { let schema = schema_for!(SmallPrime); println!("{}", serde_json::to_string_pretty(&schema).unwrap()); diff --git a/docs/_sass/custom/custom.scss b/docs/_sass/custom/custom.scss index 5c9ebca..47323dd 100644 --- a/docs/_sass/custom/custom.scss +++ b/docs/_sass/custom/custom.scss @@ -31,4 +31,9 @@ code { // Hide ugly summary outline that chrome adds .main-content summary:focus { outline: none; +} + +.main-content summary { + display: list-item; + font-style: italic; } \ No newline at end of file diff --git a/schemars/examples/enum_repr.rs b/schemars/examples/enum_repr.rs index 671bc46..3b0df97 100644 --- a/schemars/examples/enum_repr.rs +++ b/schemars/examples/enum_repr.rs @@ -8,6 +8,7 @@ enum SmallPrime { Five = 5, Seven = 7, } + fn main() { let schema = schema_for!(SmallPrime); println!("{}", serde_json::to_string_pretty(&schema).unwrap());