Format project with rustfmt

This commit is contained in:
Graham Esau 2019-12-09 17:37:49 +00:00
parent e4d69f89e7
commit 1f021fa5ae
6 changed files with 13 additions and 9 deletions

View file

@ -10,7 +10,7 @@ pub struct MyStruct {
#[derive(JsonSchema)]
pub enum MyEnum {
Unit,
StringNewType(String)
StringNewType(String),
}
fn main() {

View file

@ -15,7 +15,7 @@ pub struct MyStruct {
#[serde(untagged)]
pub enum MyEnum {
Unit,
StringNewType(String)
StringNewType(String),
}
fn main() {

View file

@ -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()
}
}

View file

@ -1,7 +1,7 @@
mod util;
use schemars::JsonSchema;
use util::*;
use std::ffi::{OsStr, OsString};
use util::*;
#[derive(Debug, JsonSchema)]
struct OsStrings {

View file

@ -7,7 +7,7 @@ use util::*;
struct MyStruct {
range: Range<usize>,
inclusive: RangeInclusive<f64>,
bound: Bound<String>
bound: Bound<String>,
}
#[test]

View file

@ -1,7 +1,7 @@
mod util;
use schemars::JsonSchema;
use util::*;
use std::time::{Duration, SystemTime};
use util::*;
#[derive(Debug, JsonSchema)]
struct MyStruct {