mirror of
https://github.com/flibusta-apps/library_updater.git
synced 2026-03-03 23:20:53 +01:00
Add pre-commit config
This commit is contained in:
10
src/utils.rs
10
src/utils.rs
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user