[WIP] fixed:+feature:std
This commit is contained in:
parent
2c476c3148
commit
8c36407303
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -282,8 +282,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "fixed"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1343b84a06a392d5475cb9884bf21bd461b7af544bee131f4d954b0fbe56e2a2"
|
||||
source = "git+https://gitlab.com/tspiteri/fixed.git?branch=std#823916346f6ee27d964b1d5a4b18a3a089ad8f11"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"typenum",
|
||||
|
|
|
@ -8,7 +8,6 @@ edition = "2018"
|
|||
chrono = { version = "0.4", features = ["serde"] }
|
||||
csv = "1.1"
|
||||
encoding = "0.2"
|
||||
fixed = { version = "0.5", features = ["serde"] }
|
||||
prettytable = { version = "0.8", package = "prettytable-rs" }
|
||||
readfilez = "0.2"
|
||||
ron = "0.5"
|
||||
|
@ -16,5 +15,11 @@ serde = { version = "1.0", features = ["derive"] }
|
|||
term = "0.5"
|
||||
thiserror = "1.0"
|
||||
|
||||
[dependencies.fixed]
|
||||
version = "0.5"
|
||||
features = ["serde", "std"]
|
||||
git = "https://gitlab.com/tspiteri/fixed.git"
|
||||
branch = "std"
|
||||
|
||||
[profile.release]
|
||||
lto = true
|
||||
|
|
|
@ -33,7 +33,7 @@ pub enum ParseError {
|
|||
Finalizer,
|
||||
|
||||
#[error("invalid fixed-point number")]
|
||||
Fixed(fixed::ParseFixedError),
|
||||
Fixed(#[from] fixed::ParseFixedError),
|
||||
|
||||
#[error("invalid integer")]
|
||||
Integer(#[from] std::num::ParseIntError),
|
||||
|
@ -42,16 +42,6 @@ pub enum ParseError {
|
|||
Waehrung(#[from] crate::simple_enums::parser_error::Waehrung),
|
||||
}
|
||||
|
||||
/// This impl block can be dropped after
|
||||
/// https://gitlab.com/tspiteri/fixed/issues/11
|
||||
/// is fixed.
|
||||
impl From<fixed::ParseFixedError> for ParseError {
|
||||
#[inline]
|
||||
fn from(x: fixed::ParseFixedError) -> ParseError {
|
||||
ParseError::Fixed(x)
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom<csv::StringRecord> for TransactionLine {
|
||||
type Error = ParseError;
|
||||
|
||||
|
|
Loading…
Reference in a new issue