Merged
Conversation
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |
dfrankland
commented
Mar 2, 2026
Comment on lines
-94
to
+97
| let test_cases: Vec<BindingsTestCase> = test_case_runs | ||
| let parent_name_map: HashMap<String, Vec<BindingsTestCase>> = test_case_runs | ||
| .into_iter() | ||
| .map(BindingsTestCase::from) | ||
| .collect(); | ||
| let parent_name_map: HashMap<String, Vec<BindingsTestCase>> = | ||
| test_cases.iter().fold(HashMap::new(), |mut acc, testcase| { | ||
| .fold(HashMap::new(), |mut acc, testcase| { |
Member
Author
There was a problem hiding this comment.
I combined these operations to skip allocating a Vec when we iterate over the results of the Vec anyways
Comment on lines
-101
to
+103
| acc.entry(parent_name.clone()) | ||
| .or_default() | ||
| .push(testcase.to_owned()); | ||
| if let Some(parent_name_vec) = acc.get_mut(parent_name) { | ||
| parent_name_vec.push(testcase); | ||
| } else { | ||
| acc.insert(parent_name.to_string(), vec![testcase]); | ||
| } |
Member
Author
There was a problem hiding this comment.
Only clone the parent_name when needed
Comment on lines
-265
to
+266
| pub fn extra(&self) -> HashMap<String, String> { | ||
| self.extra.clone() | ||
| pub fn extra(&self) -> &HashMap<String, String> { | ||
| &self.extra |
Member
Author
There was a problem hiding this comment.
The caller can clone if needed
| level, | ||
| test_suites, | ||
| valid_test_suites: valid_test_suites.into_iter().collect(), | ||
| valid_test_suites, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1045 +/- ##
==========================================
+ Coverage 81.55% 81.81% +0.25%
==========================================
Files 69 69
Lines 14691 14691
==========================================
+ Hits 11981 12019 +38
+ Misses 2710 2672 -38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
max-trunk
approved these changes
Mar 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
saves a lot of allocation and deallocation