Skip to content

Commit

Permalink
winnow-0.7: migrate to the new version of winnow
Browse files Browse the repository at this point in the history
GH-56

Signed-off-by: 35V LG84 <[email protected]>
  • Loading branch information
35VLG84 committed Feb 9, 2025
1 parent 75b4b4f commit 2f56ede
Show file tree
Hide file tree
Showing 22 changed files with 139 additions and 117 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Updated deps and tools:
** serde_json: v1.0.138
** toml: 0.8.20
** uuid: v1.13.1
** winnow: 0.7.1

===== Rust toolchain

Expand Down
102 changes: 66 additions & 36 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions tackler-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Tackler-NG 2022-2024
# Tackler-NG 2022-2025
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down Expand Up @@ -40,7 +40,7 @@ digest = "0.10.7"

gix = { version = "0.70.0", default-features = false, features = ["max-performance-safe", "revision"] }
toml = "0.8.20"
winnow = "=0.6.24" # PResult is depracated and changing it now will conflict with TEP-1015 work
winnow = "0.7.1" # PResult is depracated and changing it now will conflict with TEP-1015 work

[target.'cfg(not(target_env = "msvc"))'.dependencies]
tikv-jemallocator = { workspace = true }
Expand Down
13 changes: 3 additions & 10 deletions tackler-core/src/parser.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/*
* Tackler-NG 2022
* Tackler-NG 2022-2025
* SPDX-License-Identifier: Apache-2.0
*/

pub use crate::parser::pricedb_parser::{pricedb_from_file, pricedb_from_str};
pub use crate::parser::tackler_txns::GitInputSelector;
pub use crate::parser::tackler_txns::git_to_txns;
Expand Down Expand Up @@ -30,12 +29,7 @@ pub(crate) fn make_semantic_error<
is: &mut Stream<'is>,
msg: &str,
) -> ErrMode<E> {
winnow::error::ErrMode::from_external_error(
is,
winnow::error::ErrorKind::Verify,
TacklerTxnError::semantic_error(msg),
)
.cut()
ErrMode::from_external_error(is, TacklerTxnError::semantic_error(msg)).cut()
}

pub(crate) fn from_error<
Expand All @@ -46,9 +40,8 @@ pub(crate) fn from_error<
is: &mut Stream<'is>,
err: &SE,
) -> ErrMode<E> {
winnow::error::ErrMode::from_external_error(
ErrMode::from_external_error(
is,
winnow::error::ErrorKind::Verify,
TacklerTxnError::semantic_error(err.to_string().as_str()),
)
.cut()
Expand Down
Loading

0 comments on commit 2f56ede

Please sign in to comment.