Make validate_downcastable_from unsafe#6851
Conversation
📝 WalkthroughWalkthroughThe PR refactors RustPython's object downcasting mechanism by making Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Code has been automatically formatted The code in this PR has been formatted using:
git pull origin validate_downcastable_from-unsafe |
youknowone
left a comment
There was a problem hiding this comment.
please check the clippy. ( safety docs)
| const PAYLOAD_TYPE_ID: core::any::TypeId = core::any::TypeId::of::<PyStr>(); | ||
|
|
||
| fn validate_downcastable_from(obj: &PyObject) -> bool { | ||
| unsafe fn validate_downcastable_from(obj: &PyObject) -> bool { |
There was a problem hiding this comment.
huh, every other parts are safe but this one was unsafe
42b66a8 to
d8e999c
Compare
Meant to put this as part of #6231
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.