Skip to content

Commit 4ec35b4

Browse files
committed
format doc comments code
1 parent de0a24c commit 4ec35b4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/fixedwidth.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
//!
2727
//! ```
2828
//! # use compact_encoding::EncodingError;
29-
//! use compact_encoding::{map_decode, FixedWidthUint, FixedWidthU32};
29+
//! use compact_encoding::{map_decode, FixedWidthU32, FixedWidthUint};
3030
//! let buff = vec![42, 0, 0, 0]; // 42_u32 fixed width encoded
3131
//!
3232
//! let ((decoded,), _) = map_decode!(&buff, [FixedWidthUint<u32>]);
3333
//! assert_eq!(decoded, 42); // NOT! FixedWidthUint(42_u32)
34-
//! // or using the alias
35-
//!assert_eq!(map_decode!(&buff, [FixedWidthU32]).0.0, 42);
34+
//!
35+
//! assert_eq!(map_decode!(&buff, [FixedWidthU32]).0 .0, 42); // or using the alias
3636
//! # Ok::<(), Box<dyn std::error::Error>>(())
3737
//! ```
3838

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@
6161
//! You can implement [`CompactEncoding`]` for your own structs like below:
6262
//! ```
6363
//! use compact_encoding::{
64-
//! map_decode, map_encode, sum_encoded_size, to_encoded_bytes,
65-
//! CompactEncoding, EncodingError,
64+
//! map_decode, map_encode, sum_encoded_size, to_encoded_bytes, CompactEncoding, EncodingError,
6665
//! };
6766
//!
6867
//! #[derive(Debug, PartialEq)]
@@ -314,7 +313,7 @@ pub trait BoxArrayEncodable: CompactEncoding {
314313
/// ```
315314
/// # use crate::compact_encoding::{sum_encoded_size, CompactEncoding, EncodingError};
316315
/// let bar = 42u64;
317-
/// let result = (|| { Ok::<usize, EncodingError>(sum_encoded_size!(bar)) })().unwrap();
316+
/// let result = (|| Ok::<usize, EncodingError>(sum_encoded_size!(bar)))().unwrap();
318317
/// assert_eq!(result, 1);
319318
/// ```
320319
macro_rules! sum_encoded_size {

0 commit comments

Comments
 (0)