Skip to content

Commit

Permalink
Merge branch 'mistress' of github.com:coco33920/calc into mistress
Browse files Browse the repository at this point in the history
  • Loading branch information
vanilla-extracts committed May 14, 2024
2 parents ddc4b49 + c584fa0 commit d7bf3c3
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Version 2.13.2 : Bug fix
Fix #43

# Version 2.13.1 : Bug fix
Fix the issue of the function never used (moved implementation to the test
module)
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mini-calc"
version = "2.13.1"
version = "2.13.2"
license = "GPL-3.0-or-later"
description = "A fully-featured minimalistic configurable rust calculator"
homepage = "https://calc.nwa2coco.fr"
Expand Down
2 changes: 1 addition & 1 deletion src/configuration/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub fn load_color(string: String) -> Color {

pub fn replace_variable(str: String) -> String {
str.replace("%author%", "Charlotte Thomas")
.replace("%version%", "v2.13.1")
.replace("%version%", "v2.13.2")
.to_string()
}

Expand Down
10 changes: 9 additions & 1 deletion src/lexing/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,15 @@ pub fn lex(input: String) -> Vec<Token> {

let length = input.len();
while current_pos < input.len() {
let current_character: char = chars.get(current_pos).unwrap().to_ascii_lowercase();
let peeking_char = chars.get(current_pos);
let current_character: char;
match peeking_char {
None => {
current_pos += 1;
continue;
}
Some(t) => current_character = t.to_ascii_lowercase(),
}
if !is_an_allowed_char(current_character) {
current_pos += 1;
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ fn handle_config(line: &str, config: Config) -> (String, Option<Config>) {
fn main() {
let mut args: Args = env::args();

let version: String = "v2.13.1".to_string();
let version: String = "v2.13.2".to_string();
if args.len() > 1 || !atty::is(Stream::Stdin) {
let mut a = vec![];

Expand Down

0 comments on commit d7bf3c3

Please sign in to comment.