Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
/// # use serde_cbor_2::de;
/// let v: Vec<u8> = vec![0x66, 0x66, 0x6f, 0x6f, 0x62, 0x61, 0x72];
/// let value: &str = de::from_reader(&v[..]).unwrap();
/// assert_eq!(value, "foobar");

Check failure on line 113 in src/de.rs

View workflow job for this annotation

GitHub Actions / msrv

implementation of `serde_core::de::Deserialize` is not general enough

Check failure on line 113 in src/de.rs

View workflow job for this annotation

GitHub Actions / nightly

implementation of `serde_core::de::Deserialize` is not general enough

Check failure on line 113 in src/de.rs

View workflow job for this annotation

GitHub Actions / stable

implementation of `serde_core::de::Deserialize` is not general enough
/// ```
#[cfg(feature = "std")]
pub fn from_reader<T, R>(reader: R) -> Result<T>
Expand Down Expand Up @@ -1248,6 +1248,17 @@
lifetime: PhantomData<&'de ()>,
}

impl<'de, R, T> StreamDeserializer<'de, R, T> {
/// Changes ouptut type of the stream deserializer
pub fn change_output_type<U>(self) -> StreamDeserializer<'de, R, U> {
StreamDeserializer {
de: self.de,
output: PhantomData,
lifetime: PhantomData,
}
}
}

impl<'de, R, T> StreamDeserializer<'de, R, T>
where
R: Read<'de>,
Expand Down