mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-12 08:00:08 +01:00
refactor: RawMatch -> textbuf/raw_match.rs
This commit is contained in:
parent
9afdcf3db2
commit
f76ed75f5b
3 changed files with 10 additions and 9 deletions
|
|
@ -1,3 +1,4 @@
|
|||
mod model;
|
||||
mod raw_match;
|
||||
|
||||
pub use model::{Match, Model};
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ use std::collections;
|
|||
use regex::Regex;
|
||||
use sequence_trie::SequenceTrie;
|
||||
|
||||
use super::raw_match::RawMatch;
|
||||
use crate::alphabets::Alphabet;
|
||||
use crate::regexes::{NamedPattern, EXCLUDE_PATTERNS, PATTERNS};
|
||||
|
||||
|
|
@ -238,15 +239,6 @@ pub struct Match<'a> {
|
|||
pub hint: String,
|
||||
}
|
||||
|
||||
/// Internal surrogate for `Match`, before a Hint has been associated.
|
||||
#[derive(Debug)]
|
||||
struct RawMatch<'a> {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub pattern: &'a str,
|
||||
pub text: &'a str,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
|
|
|||
8
src/textbuf/raw_match.rs
Normal file
8
src/textbuf/raw_match.rs
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
/// Internal surrogate for `Match`, before a Hint has been associated.
|
||||
#[derive(Debug)]
|
||||
pub(super) struct RawMatch<'a> {
|
||||
pub x: i32,
|
||||
pub y: i32,
|
||||
pub pattern: &'a str,
|
||||
pub text: &'a str,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue