Skip to content

Commit

Permalink
fix: export MapAccess, SeqAccess and error module
Browse files Browse the repository at this point in the history
  • Loading branch information
lsjbd authored and liuq19 committed Dec 19, 2024
1 parent 60261b7 commit 16e4cc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub use crate::lazyvalue::{
#[doc(inline)]
pub use crate::pointer::{JsonPointer, PointerNode, PointerTree};
#[doc(inline)]
pub use crate::serde::de::{MapAccess, SeqAccess};
#[doc(inline)]
pub use crate::serde::{
from_reader, from_slice, from_slice_unchecked, from_str, to_lazyvalue, to_string,
to_string_pretty, to_vec, to_vec_pretty, to_writer, to_writer_pretty, Deserializer,
Expand Down
8 changes: 4 additions & 4 deletions src/serde/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -935,13 +935,13 @@ impl<'de, 'a, R: Reader<'de>> de::Deserializer<'de> for &'a mut Deserializer<R>
}
}

struct SeqAccess<'a, R: 'a> {
pub struct SeqAccess<'a, R: 'a> {
de: &'a mut Deserializer<R>,
first: bool, // first is marked as
}

impl<'a, R: 'a> SeqAccess<'a, R> {
fn new(de: &'a mut Deserializer<R>) -> Self {
pub fn new(de: &'a mut Deserializer<R>) -> Self {
SeqAccess { de, first: true }
}
}
Expand Down Expand Up @@ -973,13 +973,13 @@ impl<'de, 'a, R: Reader<'de> + 'a> de::SeqAccess<'de> for SeqAccess<'a, R> {
}
}

struct MapAccess<'a, R: 'a> {
pub struct MapAccess<'a, R: 'a> {
de: &'a mut Deserializer<R>,
first: bool,
}

impl<'a, R: 'a> MapAccess<'a, R> {
fn new(de: &'a mut Deserializer<R>) -> Self {
pub fn new(de: &'a mut Deserializer<R>) -> Self {
MapAccess { de, first: true }
}
}
Expand Down

0 comments on commit 16e4cc2

Please sign in to comment.