Clean up documentation.

This commit is contained in:
Bauke 2022-10-02 21:30:15 +02:00
parent 2ebc218149
commit 8b450cc724
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 3 additions and 5 deletions

View File

@ -129,9 +129,8 @@ impl OPML {
///
/// ```rust,no_run
/// use opml::OPML;
/// use std::fs::File;
///
/// let mut file = File::open("file.opml").unwrap();
/// let mut file = std::fs::File::open("file.opml").unwrap();
/// let document = OPML::from_reader(&mut file).unwrap();
/// ```
pub fn from_reader<R>(reader: &mut R) -> Result<Self, Error>
@ -203,10 +202,9 @@ impl OPML {
///
/// ```rust,no_run
/// use opml::OPML;
/// use std::fs::File;
///
/// let opml = OPML::default();
/// let mut file = File::create("file.opml").unwrap();
/// let mut file = std::fs::File::create("file.opml").unwrap();
/// let xml = opml.to_writer(&mut file).unwrap();
/// ```
pub fn to_writer<W>(&self, writer: &mut W) -> Result<(), Error>
@ -417,7 +415,7 @@ impl Outline {
/// # Example
///
/// ```rust
/// use opml::{Outline};
/// use opml::Outline;
///
/// let mut group = Outline::default();
/// group.add_feed("Feed Name", "https://example.com/");