podal/src/subscriptions.rs

11 lines
260 B
Rust
Raw Normal View History

2023-07-25 10:57:19 +01:00
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())
}