Skip to content

Commit

Permalink
chore: update dependency versions
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Kosiewski <[email protected]>
  • Loading branch information
ThomasK33 committed Mar 1, 2025
1 parent 611deb7 commit b81ae3d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 34 deletions.
39 changes: 16 additions & 23 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ categories = ["algorithms", "data-structures", "encoding"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
k8s-openapi = { version = "0.23.0", default-features = false }
nom = "7.1.3"
k8s-openapi = { version = "0.24.0", default-features = false }
nom = "8.0.0"
rust_decimal = "1.36.0"
thiserror = "1.0.64"
thiserror = "2.0.11"

[dev-dependencies]
k8s-openapi = { version = "0.23.0", default-features = false, features = [
k8s-openapi = { version = "0.24.0", default-features = false, features = [
"latest",
] }

Expand Down
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,12 @@
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
formatter
rustc

cargo
cargo-release
clippy
rustc
];
};
};
Expand Down
14 changes: 9 additions & 5 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use nom::{
character::complete::one_of,
combinator::{eof, opt},
number::complete::double,
IResult,
IResult, Parser,
};
use rust_decimal::prelude::*;
use thiserror::Error;
Expand Down Expand Up @@ -70,10 +70,13 @@ pub(crate) fn parse_quantity_string(
/// signed number
fn parse_signed_number(input: &str) -> IResult<&str, f64> {
// Default to true
let (input, positive) =
opt(parse_sign)(input).map(|(input, positive)| (input, positive.unwrap_or(true)))?;
let (input, positive) = opt(parse_sign)
.parse(input)
.map(|(input, positive)| (input, positive.unwrap_or(true)))?;
// Default num to 0.0
let (input, num) = opt(double)(input).map(|(input, num)| (input, num.unwrap_or(0.0)))?;
let (input, num) = opt(double)
.parse(input)
.map(|(input, num)| (input, num.unwrap_or(0.0)))?;

Ok((input, if positive { num } else { -num }))
}
Expand Down Expand Up @@ -104,7 +107,8 @@ fn parse_suffix(input: &str) -> IResult<&str, (Format, Scale)> {
tag("T"),
tag("P"),
tag("E"),
))(input)?;
))
.parse(input)?;

Ok((
input,
Expand Down

0 comments on commit b81ae3d

Please sign in to comment.