refactor: config names

This commit is contained in:
graelo 2021-03-21 08:51:45 +01:00
parent d558c81183
commit 0ee29303c6
6 changed files with 23 additions and 26 deletions

View file

@ -12,7 +12,7 @@ use crate::{
/// Main configuration, parsed from command line.
#[derive(Clap, Debug)]
#[clap(author, about, version)]
pub struct CliOpt {
pub struct Config {
/// Alphabet to draw hints from.
///
/// Possible values are "{A}", "{A}-homerow", "{A}-left-hand",
@ -108,7 +108,7 @@ fn parse_chars(src: &str) -> Result<(char, char), error::ParseError> {
Ok((chars[0], chars[1]))
}
impl CliOpt {
impl Config {
/// Try parsing provided options, and update self with the valid values.
pub fn merge_map(
&mut self,