Skip to content

Ignore: add tests to #610 #616

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

Merged
merged 4 commits into from
May 19, 2023
Merged

Ignore: add tests to #610 #616

merged 4 commits into from
May 19, 2023

Conversation

adriangb
Copy link
Member

No description provided.

@adriangb adriangb changed the base branch from main to eager-length-checks May 19, 2023 15:36
Comment on lines +135 to +149
#[allow(clippy::too_many_arguments)]
fn validate_tuple_positional<'s, 'data, T: Iterator<Item = PyResult<&'data I>>, I: Input<'data> + 'data>(
py: Python<'data>,
input: &'data impl Input<'data>,
extra: &Extra,
definitions: &'data Definitions<CombinedValidator>,
recursion_guard: &'s mut RecursionGuard,
output: &mut Vec<PyObject>,
errors: &mut Vec<ValLineError<'data>>,
extra_validator: &Option<Box<CombinedValidator>>,
items_validators: &[CombinedValidator],
collection_iter: &mut T,
collection_len: Option<usize>,
expected_length: usize,
) -> ValResult<'data, ()> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is basically what was inside of the macro but it didn't like the iter.map(Ok) pattern because it couldn't infer that the Err variant was a ValResult :(

@codspeed-hq
Copy link

codspeed-hq bot commented May 19, 2023

CodSpeed Performance Report

Merging #616 add-tests (29da93c) will not alter performances.

Summary

🔥 0 improvements
❌ 4 regressions
✅ 114 untouched benchmarks

🆕 1 new benchmarks
⁉️ 0 dropped benchmarks

Benchmarks breakdown

Benchmark eager-length-checks add-tests Change
test_list_of_any_core_py 25.3 µs 160.6 µs -534.24%
🆕 test_set_of_ints_core_length N/A 10.6 ms N/A
test_set_of_ints_core_json 6 ms 6.7 ms -10.98%
test_frozenset_of_ints_core 1.9 ms 2.4 ms -28.28%
test_frozenset_of_ints_duplicates_core 1.1 ms 1.3 ms -13.30%

@adriangb
Copy link
Member Author

This looks the same as #610 performance wise, so merging into there

@adriangb adriangb marked this pull request as ready for review May 19, 2023 15:43
@adriangb adriangb merged commit 3061b5c into eager-length-checks May 19, 2023
@adriangb adriangb deleted the add-tests branch May 19, 2023 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant