Switch back to official decimal
Switch back to official `decimal` because https://github.com/alkis/decimal/issues/59 is fixed
This commit is contained in:
parent
065adb3d29
commit
1db9598cd2
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -16,14 +16,14 @@ checksum = "95752358c8f7552394baf48cd82695b345628ad3f170d607de3ca03b8dacca15"
|
||||
name = "cpc"
|
||||
version = "1.3.2"
|
||||
dependencies = [
|
||||
"decimal_fixes_mirror",
|
||||
"decimal",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "decimal_fixes_mirror"
|
||||
version = "2.0.4-fix1.0.0"
|
||||
name = "decimal"
|
||||
version = "2.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "878957a52f4ae34351962b97a2bf349ec58cb86c91863e7b50f6f2c9bbd51ffa"
|
||||
checksum = "5a8ab77e91baeb15034c3be91e87bff4665c9036216148e4996d9a9f5792114d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
|
||||
@ -13,5 +13,4 @@ keywords = ["math", "expression", "evaluate", "units", "convert"]
|
||||
categories = ["mathematics", "science", "parsing", "text-processing", "value-formatting"]
|
||||
|
||||
[dependencies]
|
||||
# decimal = "2.0.4"
|
||||
decimal_fixes_mirror = "2.0.4-fix1.0.0"
|
||||
decimal = "2.1.0"
|
||||
|
||||
@ -8,7 +8,6 @@ cpc parses and evaluates strings of math, with support for units and conversion.
|
||||
|
||||
It also lets you mix units, so for example `1 km - 1m` results in `Number { value: 999, unit: Meter }`.
|
||||
|
||||
|
||||
[](https://crates.io/crates/cpc)
|
||||
[](https://docs.rs/cpc)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use decimal_fixes_mirror::d128;
|
||||
use decimal::d128;
|
||||
use crate::{Token, Number};
|
||||
use crate::units::{Unit, UnitType, convert, add, subtract, multiply, divide, modulo, pow};
|
||||
use crate::parser::AstNode;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use std::str::FromStr;
|
||||
use decimal_fixes_mirror::d128;
|
||||
use decimal::d128;
|
||||
use crate::{Token, TokenVector};
|
||||
use crate::Operator::{Caret, Divide, LeftParen, Minus, Modulo, Multiply, Plus, RightParen};
|
||||
use crate::UnaryOperator::{Percent, Factorial};
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
//! ```
|
||||
|
||||
use std::time::{Instant};
|
||||
use decimal_fixes_mirror::d128;
|
||||
use decimal::d128;
|
||||
use crate::units::Unit;
|
||||
|
||||
/// Units, and functions you can use with them
|
||||
@ -43,7 +43,7 @@ mod lookup;
|
||||
/// ```rust
|
||||
/// use cpc::{eval,Number};
|
||||
/// use cpc::units::Unit;
|
||||
/// use decimal_fixes_mirror::d128;
|
||||
/// use decimal::d128;
|
||||
///
|
||||
/// let x = Number {
|
||||
/// value: d128!(100),
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::NamedNumber::*;
|
||||
use crate::NamedNumber;
|
||||
use decimal_fixes_mirror::d128;
|
||||
use decimal::d128;
|
||||
|
||||
/// Returns the corresponding [`d128`] of a [`NamedNumber`]
|
||||
pub fn lookup_named_number(named_number: &NamedNumber) -> d128 {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
use decimal_fixes_mirror::d128;
|
||||
use decimal::d128;
|
||||
use crate::Number;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Debug)]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user