Skip to content

Why is get_mut_unchecked required? #2

@BafDyce

Description

@BafDyce

Form::state_mut() (see below) calls RC::get_mut_unchecked which is unsafe and nightly only. Unfortunately, it is not documented why this is necessary (and why Rc::get_mut() cannot be used instead). Changing this would allow us to remove the feature requirement. As a result, it would be possible to compile yew_form on stable Rust.

pub(crate) fn state_mut(&mut self) -> &mut FormState<T> {
unsafe {
Rc::get_mut_unchecked(&mut self.state)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions