mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-14 08:53:52 +01:00
refactor: rename ParseError -> Error
This commit is contained in:
parent
7d1bb69c6f
commit
5d9ea6f7f8
8 changed files with 21 additions and 19 deletions
|
|
@ -4,7 +4,7 @@ use std::fmt;
|
|||
use clap::{ArgEnum, Parser};
|
||||
|
||||
use super::basic;
|
||||
use crate::{error::ParseError, textbuf::alphabet, tmux, ui, Result};
|
||||
use crate::{error::Error, textbuf::alphabet, tmux, ui, Result};
|
||||
|
||||
/// Extended configuration for handling Tmux-specific configuration (options
|
||||
/// and outputs). This is only used by `tmux-copyrat` and parsed from command
|
||||
|
|
@ -66,7 +66,7 @@ impl ConfigExt {
|
|||
"@copyrat-capture-region" => {
|
||||
let case_insensitive = true;
|
||||
config_ext.capture_region = CaptureRegion::from_str(value, case_insensitive)
|
||||
.map_err(ParseError::ExpectedEnumVariant)?
|
||||
.map_err(Error::ExpectedEnumVariant)?
|
||||
}
|
||||
"@copyrat-alphabet" => {
|
||||
inner.alphabet = alphabet::parse_alphabet(value)?;
|
||||
|
|
@ -92,13 +92,13 @@ impl ConfigExt {
|
|||
"@copyrat-hint-alignment" => {
|
||||
let case_insensitive = true;
|
||||
inner.hint_alignment = ui::HintAlignment::from_str(value, case_insensitive)
|
||||
.map_err(ParseError::ExpectedEnumVariant)?
|
||||
.map_err(Error::ExpectedEnumVariant)?
|
||||
}
|
||||
"@copyrat-hint-style" => {
|
||||
let case_insensitive = true;
|
||||
inner.hint_style = Some(
|
||||
basic::HintStyleArg::from_str(value, case_insensitive)
|
||||
.map_err(ParseError::ExpectedEnumVariant)?,
|
||||
.map_err(Error::ExpectedEnumVariant)?,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue