Skip to content

Conversation

@mpsc0x
Copy link
Collaborator

@mpsc0x mpsc0x commented Aug 4, 2025

This PR properly destructs the TokenBaseState and deallocates any storage when the token is dropped.

@mpsc0x mpsc0x self-assigned this Aug 4, 2025
@codecov
Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.89%. Comparing base (886d7d9) to head (b2befbc).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #44   +/-   ##
=======================================
  Coverage   96.89%   96.89%           
=======================================
  Files          16       16           
  Lines         515      515           
=======================================
  Hits          499      499           
  Misses         16       16           
Flag Coverage Δ
move 96.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

meng-xu-cs
meng-xu-cs previously approved these changes Aug 4, 2025
Comment on lines 657 to 661
if (smart_table::length(&user_state) == 0) {
smart_table::destroy_empty(user_state);
} else {
smart_table::destroy(user_state);
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can skip the if check and just use destroy

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks @meng-xu-cs , fixed.

matchv
matchv previously approved these changes Aug 4, 2025
@mpsc0x mpsc0x dismissed stale reviews from matchv and meng-xu-cs via b2befbc August 4, 2025 17:31
@mpsc0x mpsc0x force-pushed the fix/mpsc0x/dropping-token-base-state branch from 1f33499 to b2befbc Compare August 4, 2025 17:31
@mpsc0x mpsc0x merged commit 73684bf into main Aug 4, 2025
12 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.

4 participants