Format project with rustfmt
This commit is contained in:
parent
e4d69f89e7
commit
1f021fa5ae
6 changed files with 13 additions and 9 deletions
|
@ -10,7 +10,7 @@ pub struct MyStruct {
|
|||
#[derive(JsonSchema)]
|
||||
pub enum MyEnum {
|
||||
Unit,
|
||||
StringNewType(String)
|
||||
StringNewType(String),
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -15,7 +15,7 @@ pub struct MyStruct {
|
|||
#[serde(untagged)]
|
||||
pub enum MyEnum {
|
||||
Unit,
|
||||
StringNewType(String)
|
||||
StringNewType(String),
|
||||
}
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -14,8 +14,10 @@ impl JsonSchema for Duration {
|
|||
let obj = schema.object();
|
||||
obj.required.insert("secs".to_owned());
|
||||
obj.required.insert("nanos".to_owned());
|
||||
obj.properties.insert("secs".to_owned(), <u64>::json_schema(gen));
|
||||
obj.properties.insert("nanos".to_owned(), <u32>::json_schema(gen));
|
||||
obj.properties
|
||||
.insert("secs".to_owned(), <u64>::json_schema(gen));
|
||||
obj.properties
|
||||
.insert("nanos".to_owned(), <u32>::json_schema(gen));
|
||||
schema.into()
|
||||
}
|
||||
}
|
||||
|
@ -31,8 +33,10 @@ impl JsonSchema for SystemTime {
|
|||
let obj = schema.object();
|
||||
obj.required.insert("secs_since_epoch".to_owned());
|
||||
obj.required.insert("nanos_since_epoch".to_owned());
|
||||
obj.properties.insert("secs_since_epoch".to_owned(), <u64>::json_schema(gen));
|
||||
obj.properties.insert("nanos_since_epoch".to_owned(), <u32>::json_schema(gen));
|
||||
obj.properties
|
||||
.insert("secs_since_epoch".to_owned(), <u64>::json_schema(gen));
|
||||
obj.properties
|
||||
.insert("nanos_since_epoch".to_owned(), <u32>::json_schema(gen));
|
||||
schema.into()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod util;
|
||||
use schemars::JsonSchema;
|
||||
use util::*;
|
||||
use std::ffi::{OsStr, OsString};
|
||||
use util::*;
|
||||
|
||||
#[derive(Debug, JsonSchema)]
|
||||
struct OsStrings {
|
||||
|
|
|
@ -7,7 +7,7 @@ use util::*;
|
|||
struct MyStruct {
|
||||
range: Range<usize>,
|
||||
inclusive: RangeInclusive<f64>,
|
||||
bound: Bound<String>
|
||||
bound: Bound<String>,
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
mod util;
|
||||
use schemars::JsonSchema;
|
||||
use util::*;
|
||||
use std::time::{Duration, SystemTime};
|
||||
use util::*;
|
||||
|
||||
#[derive(Debug, JsonSchema)]
|
||||
struct MyStruct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue