move todo_per_backend into separate module

This commit is contained in:
steven-omaha
2023-01-10 15:21:02 +01:00
parent 627f66ea35
commit 1bf19f4669
4 changed files with 102 additions and 83 deletions
+6 -2
View File
@@ -68,8 +68,12 @@ impl Group {
P: AsRef<Path>,
{
let path = p.as_ref();
let content = read_to_string(path).unwrap();
let name = path.file_name().unwrap().to_string_lossy().to_string();
let content = read_to_string(path).context("reading file content")?;
let name = path
.file_name()
.context("getting file name")?
.to_string_lossy()
.to_string();
let mut lines = content.lines().peekable();
let mut sections = HashSet::new();