Skip to content

Commit

Permalink
Make a cosmetic adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanUkhov committed Apr 11, 2024
1 parent ed51029 commit 626016a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
//! ```

use std::fs::File;
use std::io::{self, Read, Write};
use std::io::{Read, Result, Write};
use std::path::Path;

pub mod node;
Expand All @@ -76,7 +76,7 @@ pub use crate::parser::Parser;
pub type Document = node::element::SVG;

/// Open a document.
pub fn open<T>(path: T, content: &'_ mut String) -> io::Result<Parser<'_>>
pub fn open<T>(path: T, content: &'_ mut String) -> Result<Parser<'_>>
where
T: AsRef<Path>,
{
Expand All @@ -86,12 +86,12 @@ where
}

/// Read a document.
pub fn read(content: &'_ str) -> io::Result<Parser<'_>> {
pub fn read(content: &'_ str) -> Result<Parser<'_>> {
Ok(Parser::new(content))
}

/// Save a document.
pub fn save<T, U>(path: T, document: &U) -> io::Result<()>
pub fn save<T, U>(path: T, document: &U) -> Result<()>
where
T: AsRef<Path>,
U: Node,
Expand All @@ -101,7 +101,7 @@ where
}

/// Write a document.
pub fn write<T, U>(mut target: T, document: &U) -> io::Result<()>
pub fn write<T, U>(mut target: T, document: &U) -> Result<()>
where
T: Write,
U: Node,
Expand Down

0 comments on commit 626016a

Please sign in to comment.