Rust rustfmt
This commit is contained in:
parent
1c47af475f
commit
a85f0fc7bc
4 changed files with 10 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::_alloc_prelude::*;
|
||||
use crate::SchemaGenerator;
|
||||
use crate::_alloc_prelude::*;
|
||||
use crate::{json_schema, JsonSchema, Schema};
|
||||
use alloc::borrow::Cow;
|
||||
use either1::Either;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::_alloc_prelude::*;
|
||||
use crate::SchemaGenerator;
|
||||
use crate::_alloc_prelude::*;
|
||||
use crate::{json_schema, JsonSchema, Schema};
|
||||
use alloc::borrow::Cow;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
use crate::_alloc_prelude::*;
|
||||
use crate::SchemaGenerator;
|
||||
use crate::_alloc_prelude::*;
|
||||
use crate::{json_schema, JsonSchema, Schema};
|
||||
use alloc::borrow::Cow;
|
||||
use alloc::collections::BTreeMap;
|
||||
|
|
|
@ -36,7 +36,9 @@ impl Format {
|
|||
match s {
|
||||
"email" => Format::Email,
|
||||
"url" => Format::Uri,
|
||||
_ => panic!("Invalid format attr string `{s}`. This is a bug in schemars, please raise an issue!"),
|
||||
_ => {
|
||||
panic!("Invalid format attr string `{s}`. This is a bug in schemars, please raise an issue!")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -156,7 +158,9 @@ impl ValidationAttrs {
|
|||
(_, Some(_), _) => cx.mutual_exclusive_error(&meta, "contains"),
|
||||
(None, None, "schemars") => self.regex = parse_schemars_regex(meta, cx).ok(),
|
||||
(None, None, "validate") => self.regex = parse_validate_regex(meta, cx).ok(),
|
||||
(None, None, wat) => panic!("Unexpected attr type `{wat}` for regex item. This is a bug in schemars, please raise an issue!"),
|
||||
(None, None, wat) => {
|
||||
panic!("Unexpected attr type `{wat}` for regex item. This is a bug in schemars, please raise an issue!")
|
||||
}
|
||||
},
|
||||
"contains" => match (&self.regex, &self.contains) {
|
||||
(Some(_), _) => cx.mutual_exclusive_error(&meta, "regex"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue