Format with rustfmt and clang-format
diff --git a/syntax/impls.rs b/syntax/impls.rs
index b040753..d3c4b0f 100644
--- a/syntax/impls.rs
+++ b/syntax/impls.rs
@@ -114,10 +114,7 @@
impl PartialEq for Slice {
fn eq(&self, other: &Slice) -> bool {
- let Slice {
- bracket: _,
- inner,
- } = self;
+ let Slice { bracket: _, inner } = self;
let Slice {
bracket: _,
inner: inner2,
@@ -128,10 +125,7 @@
impl Hash for Slice {
fn hash<H: Hasher>(&self, state: &mut H) {
- let Slice {
- bracket: _,
- inner,
- } = self;
+ let Slice { bracket: _, inner } = self;
inner.hash(state);
}
}
diff --git a/syntax/parse.rs b/syntax/parse.rs
index 6156a69..95dd67c 100644
--- a/syntax/parse.rs
+++ b/syntax/parse.rs
@@ -230,14 +230,12 @@
fn parse_type_slice(ty: &TypeSlice) -> Result<Type> {
let inner = parse_type(&ty.elem)?;
let which = match &inner {
- Type::Ident(ident) if ident == "u8" => {
- Type::Slice
- },
- _ => return Err(Error::new_spanned(ty, "unsupported type"))
+ Type::Ident(ident) if ident == "u8" => Type::Slice,
+ _ => return Err(Error::new_spanned(ty, "unsupported type")),
};
Ok(which(Box::new(Slice {
bracket: ty.bracket_token,
- inner
+ inner,
})))
}
@@ -251,14 +249,10 @@
Type::Str
}
}
- Type::Slice(inner2) => {
- match &inner2.inner {
- Type::Ident(ident) if ident == "u8" => {
- Type::SliceRefU8
- }
- _ => return Err(Error::new_spanned(ty, "unsupported type"))
- }
- }
+ Type::Slice(inner2) => match &inner2.inner {
+ Type::Ident(ident) if ident == "u8" => Type::SliceRefU8,
+ _ => return Err(Error::new_spanned(ty, "unsupported type")),
+ },
_ => Type::Ref,
};
Ok(which(Box::new(Ref {