diff --git a/hammond-data/src/opml.rs b/hammond-data/src/opml.rs index 618c290..20ebfc8 100644 --- a/hammond-data/src/opml.rs +++ b/hammond-data/src/opml.rs @@ -52,8 +52,8 @@ pub fn import_to_db(reader: R) -> Result, reader::Error> { /// return the new `Source`s // TODO: Write test pub fn import_from_file>(path: P) -> Result, DataError> { - let content = fs::read_to_string(path)?; - import_to_db(content.as_bytes()).map_err(From::from) + let content = fs::read(path)?; + import_to_db(content.as_slice()).map_err(From::from) } /// Extracts the `outline` elemnts from a reader `R` and returns a `HashSet` of `Opml` structs.