Skip to content

Conversation

@pluveto
Copy link
Contributor

@pluveto pluveto commented Nov 26, 2024

No description provided.

Copy link
Collaborator

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

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

Thank you!

I think it makes sense to panic if implementation of underlying I/O objects is wrong.

How do you think @robjtede ?

@link2xt
Copy link
Contributor

link2xt commented Mar 14, 2025

I generally prefer debug_assert! so libraries do not panic in production. Using assert! is not much better than using .unwrap() "because this should never return an error". It is very hard to debug a mobile app and get logs from a user when the app crashes because something in compression library decided to panic.

Signed-off-by: Jiahao XU <[email protected]>
Signed-off-by: Jiahao XU <[email protected]>
@NobodyXu
Copy link
Collaborator

NobodyXu commented Mar 14, 2025

I generally prefer debug_assert! so libraries do not panic in production. Using assert! is not much better than using .unwrap() "because this should never return an error". It is very hard to debug a mobile app and get logs from a user when the app crashes because something in compression library decided to panic.

Thanks I think that makes sense to me

Applied the suggestion

@NobodyXu NobodyXu enabled auto-merge March 14, 2025 09:35
@NobodyXu NobodyXu added this pull request to the merge queue Mar 14, 2025
Merged via the queue into Nullus157:main with commit c695fc2 Mar 14, 2025
17 checks passed
@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (eb7abe2) to head (292ea4c).
Report is 25 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #316   +/-   ##
===========================
===========================

☔ View full report in Codecov by Sentry.
📢 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.

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.

3 participants