Skip to content

Remove unnecessary casts - #219

Merged
gz merged 1 commit into
gz:masterfrom
FranciscoTGouveia:remove-casts
Aug 10, 2026
Merged

Remove unnecessary casts#219
gz merged 1 commit into
gz:masterfrom
FranciscoTGouveia:remove-casts

Conversation

@FranciscoTGouveia

Copy link
Copy Markdown
Contributor

If I am not overlooking anything, I believe these casts are redundant and can thus be safely removed.

For reference, these changes were found by an optimizer developed as a research project.

CC @nunoplopes

Comment thread examples/topology.rs
max_logical_processor_ids as u8,
smt_max_cores_for_package as u8,
);
return (max_logical_processor_ids, smt_max_cores_for_package);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Suggested change
return (max_logical_processor_ids, smt_max_cores_for_package);
(max_logical_processor_ids, smt_max_cores_for_package)

lgtm

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I believe I need to keep the return keyword, as the return statement is inside an if.

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 39.71%. Comparing base (a283527) to head (eb6ef66).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #219   +/-   ##
=======================================
  Coverage   39.71%   39.71%           
=======================================
  Files           4        4           
  Lines        4497     4497           
=======================================
  Hits         1786     1786           
  Misses       2711     2711           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gz
gz merged commit f5e7057 into gz:master Aug 10, 2026
5 checks passed
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.

2 participants