Skip to content

Commit 6fe8572

Browse files
committed
Prepare release 1.2.0
1 parent ff6f01b commit 6fe8572

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "helix-calc"
3-
version = "1.1.1"
3+
version = "1.2.0"
44
authors = ["Fred Gobry <[email protected]>"]
5-
edition = "2021"
5+
edition = "2024"
66
description = "Reverse Polish Notation calculator in a terminal app."
77
repository = "https://github.com/chbug/hc"
88
readme = "README.md"

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
Helix Calc is a simple Reverse Polish Notation calculator.
22

33
It's written in Rust, using [Ratatui](https://ratatui.rs) for the
4-
cross-platform interface and #bigdecimal for the internal operations.
4+
cross-platform interface and [bigdecimal-rs](https://github.com/akubera/bigdecimal-rs)
5+
for the internal operations.
56

67
The name is inspired by [Helix Editor](https://helix-editor.com/), and the
78
functionality by the venerable GNU dc.

src/stack.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{collections::VecDeque, str::FromStr};
22

3-
use bigdecimal::{num_bigint::BigInt, BigDecimal, ParseBigDecimalError, Pow, ToPrimitive, Zero};
3+
use bigdecimal::{BigDecimal, ParseBigDecimalError, Pow, ToPrimitive, Zero, num_bigint::BigInt};
44
use thiserror::Error;
55

66
use crate::state::State;
@@ -124,9 +124,7 @@ impl Stack {
124124
// Arbitrarily cap the number of digits of the result to avoid
125125
// accidental freeze / memory blowup when pressing ^ too many times.
126126
if BigInt::from(a.bits()) * &b > BigInt::from(MAX_BIT_COUNT) {
127-
return Err(StackError::InvalidArgument(
128-
"chickening out of creating such a large result".into(),
129-
));
127+
return Err(StackError::InvalidArgument("too big for me".into()));
130128
}
131129
Ok([a, b])
132130
})?;
@@ -388,9 +386,7 @@ mod tests {
388386
s.apply(Op::Push(2000.into()))?;
389387
assert_eq!(
390388
s.apply(Op::Pow),
391-
Err(StackError::InvalidArgument(
392-
"chickening out of creating such a large result".into()
393-
))
389+
Err(StackError::InvalidArgument("too big for me".into()))
394390
);
395391

396392
Ok(())

0 commit comments

Comments
 (0)