mirror of
https://codeberg.org/icewind/galton.git
synced 2026-06-04 02:44:07 +02:00
flake update
This commit is contained in:
parent
4c0ebc138d
commit
9146f9deeb
4 changed files with 19 additions and 27 deletions
|
|
@ -69,7 +69,7 @@ struct RegexMatchExtractor {
|
|||
}
|
||||
|
||||
impl Extractor for RegexMatchExtractor {
|
||||
fn extract(&self, field: &str) -> Option<Result<Cow<str>, Box<dyn Error>>> {
|
||||
fn extract<'a>(&'a self, field: &str) -> Option<Result<Cow<'a, str>, Box<dyn Error>>> {
|
||||
let value = self
|
||||
.matches
|
||||
.iter()
|
||||
|
|
|
|||
|
|
@ -3,17 +3,9 @@ use crate::file::FileInfo;
|
|||
use regex::Regex;
|
||||
use std::error::Error;
|
||||
use std::fmt::Debug;
|
||||
use thiserror::Error;
|
||||
|
||||
mod filemeta;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
#[error("Malformed match rule '{input}': {error}")]
|
||||
pub struct MatcherParseError {
|
||||
input: String,
|
||||
error: Box<dyn Error>,
|
||||
}
|
||||
|
||||
fn map_result<T: Matcher + 'static, E: Error + 'static>(
|
||||
res: Result<T, E>,
|
||||
) -> Result<Box<dyn Matcher>, Box<dyn Error>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue