Skip to content

Commit

Permalink
fix merge race
Browse files Browse the repository at this point in the history
  • Loading branch information
ahl committed Aug 12, 2024
1 parent c930b17 commit c965c6d
Showing 1 changed file with 30 additions and 14 deletions.
44 changes: 30 additions & 14 deletions typify/tests/schemas/property-name-collision.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#[doc = r" Error types."]
pub mod error {
#[doc = r" Error from a TryFrom or FromStr implementation."]
pub struct ConversionError(std::borrow::Cow<'static, str>);
impl std::error::Error for ConversionError {}
impl std::fmt::Display for ConversionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
std::fmt::Display::fmt(&self.0, f)
pub struct ConversionError(::std::borrow::Cow<'static, str>);
impl ::std::error::Error for ConversionError {}
impl ::std::fmt::Display for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Display::fmt(&self.0, f)
}
}
impl std::fmt::Debug for ConversionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
std::fmt::Debug::fmt(&self.0, f)
impl ::std::fmt::Debug for ConversionError {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
::std::fmt::Debug::fmt(&self.0, f)
}
}
impl From<&'static str> for ConversionError {
Expand All @@ -35,10 +35,18 @@ pub mod error {
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(
Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, serde :: Deserialize, serde :: Serialize,
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub struct Baz(pub String);
impl std::ops::Deref for Baz {
impl ::std::ops::Deref for Baz {
type Target = String;
fn deref(&self) -> &String {
&self.0
Expand Down Expand Up @@ -92,7 +100,7 @@ impl ToString for Baz {
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(Clone, Debug, serde :: Deserialize, serde :: Serialize)]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
pub struct Foo {
#[serde(rename = "Bar", default, skip_serializing_if = "Option::is_none")]
pub bar: Option<FooBar>,
Expand All @@ -119,7 +127,7 @@ impl From<&Foo> for Foo {
#[doc = "}"]
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(Clone, Debug, serde :: Deserialize, serde :: Serialize)]
#[derive(:: serde :: Deserialize, :: serde :: Serialize, Clone, Debug)]
#[serde(untagged)]
pub enum FooBar {
FooBar(FooBar2),
Expand Down Expand Up @@ -189,10 +197,18 @@ impl From<Baz> for FooBar {
#[doc = r" ```"]
#[doc = r" </details>"]
#[derive(
Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd, serde :: Deserialize, serde :: Serialize,
:: serde :: Deserialize,
:: serde :: Serialize,
Clone,
Debug,
Eq,
Hash,
Ord,
PartialEq,
PartialOrd,
)]
pub struct FooBar2(pub String);
impl std::ops::Deref for FooBar2 {
impl ::std::ops::Deref for FooBar2 {
type Target = String;
fn deref(&self) -> &String {
&self.0
Expand Down

0 comments on commit c965c6d

Please sign in to comment.