Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Deref/DerefMut out of T to Gd<T>; InstanceStorage safety #370

Merged
merged 3 commits into from
Aug 3, 2023

Commits on Aug 3, 2023

  1. Gd: replace Deref/DerefMut with base() + base_mut(); rework InstanceS…

    …torage
    
    No more implicit access to base; avoids runtime-borrowing (Godot objects don't have Rust borrow limits)
    and makes access more explicit.
    
    InstanceStorage is now only accessed via shared-ref, which should fix some soundness issues with unbounded &mut.
    All fields are immutable or have interior mutability.
    Bromeon committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    9a5b213 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c7561e7 View commit details
    Browse the repository at this point in the history
  3. Allow Deref/DerefMut for all Gd<T>; remove Gd::base/base_mut() again

    More uniform and should be safe.
    Bromeon committed Aug 3, 2023
    Configuration menu
    Copy the full SHA
    4dd712c View commit details
    Browse the repository at this point in the history