podal/src/subscriptions.rs

10 lines
260 B
Rust

use crate::prelude::*;
use std::fs::File;
use std::io::{BufRead, BufReader, Lines};
pub fn lines_from(file_name: &str) -> Result<Lines<BufReader<File>>> {
let file = File::open(file_name)?;
let reader = BufReader::new(file);
Ok(reader.lines())
}