Skip to content

Commit

Permalink
style: cargo fmt for rfc8949 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxxep committed Nov 27, 2024
1 parent c7a794e commit 00913bd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ciborium/src/ser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl<W: Write> Serializer<W> {
pub fn new(encoder: impl Into<Encoder<W>>, canonicalization: CanonicalizationScheme) -> Self {
Self {
encoder: encoder.into(),
canonicalization
canonicalization,
}
}
}
Expand Down Expand Up @@ -718,7 +718,10 @@ pub fn to_vec<T: ?Sized + ser::Serialize>(value: &T) -> Result<Vec<u8>, Error<st
/// ```
#[cfg(feature = "std")]
#[inline]
pub fn to_vec_canonical<T: ?Sized + ser::Serialize>(value: &T, scheme: CanonicalizationScheme) -> Result<Vec<u8>, Error<std::io::Error>> {
pub fn to_vec_canonical<T: ?Sized + ser::Serialize>(
value: &T,
scheme: CanonicalizationScheme,
) -> Result<Vec<u8>, Error<std::io::Error>> {
let mut buffer = std::vec::Vec::with_capacity(1024);
let mut serializer = Serializer::new(&mut buffer, scheme);
value.serialize(&mut serializer)?;
Expand Down Expand Up @@ -792,4 +795,4 @@ where
{
let mut encoder = Serializer::new(writer, scheme);
value.serialize(&mut encoder)
}
}

0 comments on commit 00913bd

Please sign in to comment.