Add pre-commit config

This commit is contained in:
2023-09-24 22:39:54 +02:00
parent dd79f3635d
commit 90d461025c
6 changed files with 108 additions and 161 deletions

View File

@@ -1,8 +1,8 @@
use ammonia::Builder;
use maplit::hashset;
use std::fs::File;
use std::io::{self, BufRead};
use std::path::Path;
use ammonia::Builder;
use maplit::hashset;
pub fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
where
@@ -35,13 +35,9 @@ pub fn fix_annotation_text(text: &str) -> String {
}
let tags = hashset!["a"];
Builder::new()
.tags(tags)
.clean(&temp_text)
.to_string()
Builder::new().tags(tags).clean(&temp_text).to_string()
}
#[cfg(test)]
mod tests {
use crate::utils::fix_annotation_text;