Skip to content

Commit

Permalink
Allow RustyWind to be cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Feb 2, 2025
1 parent 3af70d9 commit e8dae66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rustywind-core/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use aho_corasick::{Anchored, Input};
use regex::Captures;

/// The options to pass to the sorter.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct RustyWind {
pub regex: FinderRegex,
pub sorter: Sorter,
Expand Down
4 changes: 2 additions & 2 deletions rustywind-core/src/sorter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub(crate) static SORTER_EXTRACTOR_RE: Lazy<Regex> =
Lazy::new(|| Regex::new(r"^(\.[^\s]+)[ ]").unwrap());

/// Use either our default regex in [crate::defaults::RE] or a custom regex.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum FinderRegex {
DefaultRegex,
CustomRegex(Regex),
Expand All @@ -34,7 +34,7 @@ impl Deref for FinderRegex {
}

/// Use either our default sorter in [crate::defaults::SORTER] or a custom sorter.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub enum Sorter {
DefaultSorter,
CustomSorter(HashMap<String, usize>),
Expand Down

0 comments on commit e8dae66

Please sign in to comment.