Skip to content

Commit

Permalink
(proc_macro) update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Nov 7, 2024
1 parent 99e348d commit d0fefe8
Showing 1 changed file with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
source: crates/hdx_proc_macro/src/test.rs
expression: pretty
---
#[derive(Debug, PartialEq, Clone, Hash)]
#[cfg_attr(feature = "serde", derive(serde::Serialize), serde())]
struct Foo(
pub types::AnimateableFeature,
pub Option<types::AnimateableFeature>,
pub Option<types::AnimateableFeature>,
);
#[automatically_derived]
impl<'a> ::hdx_parser::Peek<'a> for Foo {
fn peek(parser: &::hdx_parser::Parser<'a>) -> Option<::hdx_lexer::Token> {
use ::hdx_parser::Peek;
parser.peek::<types::AnimateableFeature>()
}
}
#[automatically_derived]
impl<'a> ::hdx_parser::Parse<'a> for Foo {
fn parse(parser: &mut ::hdx_parser::Parser<'a>) -> ::hdx_parser::Result<Self> {
use ::hdx_parser::Parse;
let val0 = parser.parse::<types::AnimateableFeature>()?;
let val1 = parser.parse_if_peek::<types::AnimateableFeature>()?;
let val2 = parser.parse_if_peek::<types::AnimateableFeature>()?;
Ok(Self(val0, val1, val2))
}
}
#[automatically_derived]
impl<'a> ::hdx_writer::WriteCss<'a> for Foo {
fn write_css<W: ::hdx_writer::CssWriter>(
&self,
sink: &mut W,
) -> ::hdx_writer::Result {
use ::hdx_writer::WriteCss;
self.0.write_css(sink)?;
if let Some(inner) = &self.1 {
sink.write_char(' ')?;
inner.write_css(sink)?;
}
if let Some(inner) = &self.2 {
sink.write_char(' ')?;
inner.write_css(sink)?;
}
Ok(())
}
}

0 comments on commit d0fefe8

Please sign in to comment.