Skip to content

Commit

Permalink
fmt, clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
preston-evans98 committed Sep 11, 2023
1 parent cd71360 commit d7fdd8f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl<'de> Deserializer<&'de [u8]> {
}
}

impl<'de, R> Deserializer<R> {
impl<R> Deserializer<R> {
fn enter_named_container(&mut self, name: &'static str) -> Result<()> {
if self.max_remaining_depth == 0 {
return Err(Error::ExceededContainerDepthLimit(name));
Expand Down
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ pub const MAX_SEQUENCE_LENGTH: usize = (1 << 31) - 1;
/// Maximal allowed depth of BCS data, counting only structs and enums.
pub const MAX_CONTAINER_DEPTH: usize = 500;

pub use de::{from_bytes, from_bytes_seed, from_bytes_seed_with_limit, from_bytes_with_limit, from_reader, from_reader_seed};
pub use de::{
from_bytes, from_bytes_seed, from_bytes_seed_with_limit, from_bytes_with_limit, from_reader,
from_reader_seed,
};
pub use error::{Error, Result};
pub use ser::{
is_human_readable, serialize_into, serialize_into_with_limit, serialized_size,
Expand Down
4 changes: 2 additions & 2 deletions tests/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use proptest_derive::Arbitrary;
use serde::{de::DeserializeOwned, Deserialize, Serialize};

use bcs::{
from_bytes, from_reader, from_bytes_with_limit, to_bytes_with_limit, serialized_size, to_bytes, Error, MAX_CONTAINER_DEPTH,
MAX_SEQUENCE_LENGTH,
from_bytes, from_bytes_with_limit, from_reader, serialized_size, to_bytes, to_bytes_with_limit,
Error, MAX_CONTAINER_DEPTH, MAX_SEQUENCE_LENGTH,
};

/// A helper function to attempt deserialization via reader
Expand Down

0 comments on commit d7fdd8f

Please sign in to comment.