From c2c4c1047891f72da3a36a7af49a998e4419b513 Mon Sep 17 00:00:00 2001 From: hisbaan Date: Sat, 30 Apr 2022 12:05:08 -0400 Subject: [PATCH] Bump version number for new release --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/main.rs | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39b1fbd..7103908 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -425,7 +425,7 @@ dependencies = [ [[package]] name = "didyoumean" -version = "1.1.1" +version = "1.1.2" dependencies = [ "atty", "clap 3.1.10", diff --git a/Cargo.toml b/Cargo.toml index 8401a99..e27fa2b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "didyoumean" authors = ["Hisbaan Noorani"] -version = "1.1.1" +version = "1.1.2" edition = "2021" license = "GPL-3.0" description = "A CLI spelling corrector" diff --git a/src/main.rs b/src/main.rs index 77ec96e..d0c388d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ -pub mod lib; pub mod langs; +pub mod lib; use clap::Parser; use colored::*; @@ -15,8 +15,8 @@ use std::{ }; use tokio; -use lib::{edit_distance, insert_and_shift, yank}; use langs::{LOCALES, SUPPORTED_LANGS}; +use lib::{edit_distance, insert_and_shift, yank}; // Parse command line arguments to get the search term. #[derive(Parser)] @@ -79,7 +79,11 @@ fn run_app() -> std::result::Result<(), Error> { // Add words to vector. for key in SUPPORTED_LANGS.keys() { - langs.push(format!(" - {}: {}", key, SUPPORTED_LANGS.get(key).clone().unwrap())); + langs.push(format!( + " - {}: {}", + key, + SUPPORTED_LANGS.get(key).clone().unwrap() + )); } // Sort and print vector. @@ -147,7 +151,6 @@ fn run_app() -> std::result::Result<(), Error> { } // Get word list. The program will only get here if/when this is a valid word list. - // TODO figure out non utf-8 chars let word_list = fs::read_to_string(dirs::data_dir().unwrap().join("didyoumean").join(args.lang)) .expect("Error reading file");