Skip to content

Commit 6d62f12

Browse files
committed
Fixup documentation
- Remove duplicate words
1 parent bd0db14 commit 6d62f12

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/de.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ use std::{io, vec::Vec};
1818
///
1919
/// # Errors
2020
///
21-
/// Deserialization can fail if the data is not valid, if the data cannot cannot be deserialized
22-
/// into an instance of `T`, if there is trailing data, and other IO errors.
21+
/// Deserialization can fail if the data is not valid, if the data cannot be
22+
/// deserialized into an instance of `T`, if there is trailing data, and other
23+
/// IO errors.
2324
#[cfg(feature = "std")]
2425
pub fn from_reader<R, T>(r: R) -> Result<T>
2526
where
@@ -41,8 +42,9 @@ where
4142
///
4243
/// # Errors
4344
///
44-
/// Deserialization can fail if the data is not valid, if the data cannot cannot be deserialized
45-
/// into an instance of `T`, if there is trailing data, and other IO errors.
45+
/// Deserialization can fail if the data is not valid, if the data cannot be
46+
/// deserialized into an instance of `T`, if there is trailing data, and other
47+
/// IO errors.
4648
pub fn from_slice<'a, T>(s: &'a [u8]) -> Result<T>
4749
where
4850
T: de::Deserialize<'a>,
@@ -113,7 +115,8 @@ where
113115
///
114116
/// # Errors
115117
///
116-
/// An error is returned if there are unconsumed bytes in the readable source.
118+
/// An error is returned if there are unconsumed bytes in the readable
119+
/// source.
117120
pub fn end(&mut self) -> Result<()> {
118121
match self.read.peek() {
119122
Some(r) => r.and(Err(Error::new(

0 commit comments

Comments
 (0)