Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winnow-0.7: migrate to the new version of winnow #65

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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