Skip to content

Commit e13c3f8

Browse files
committed
Serializer::collect_str: Format with cargo fmt
1 parent 6767ae1 commit e13c3f8

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ser/mod.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,14 @@ impl<'a, 'b: 'a> ser::Serializer for &'a mut Serializer<'b> {
447447
self.push(b'"')?;
448448

449449
let mut col = StringCollector::new(self);
450-
fmt::write(&mut col, format_args!("{}", value))
451-
.or(Err(Error::BufferFull))?;
450+
fmt::write(&mut col, format_args!("{}", value)).or(Err(Error::BufferFull))?;
452451

453452
self.push(b'"')
454453
}
455454
}
456455

457456
struct StringCollector<'a, 'b> {
458-
ser: &'a mut Serializer<'b>
457+
ser: &'a mut Serializer<'b>,
459458
}
460459

461460
impl<'a, 'b> StringCollector<'a, 'b> {
@@ -478,7 +477,6 @@ impl<'a, 'b> fmt::Write for StringCollector<'a, 'b> {
478477
}
479478
}
480479

481-
482480
/// Serializes the given data structure as a string of JSON text
483481
#[cfg(feature = "heapless")]
484482
pub fn to_string<T, const N: usize>(value: &T) -> Result<String<N>>

0 commit comments

Comments
 (0)