Skip to content

[exersizes/conversions/as_ref_mut.rs] Why should I want to use AsRef / AsMut #1350

Open
@TheLarkInn

Description

@TheLarkInn

As a first time rust learner, after the as_ref_mut.rs lesson, I was left curious why AsRef or AsMut are valuable tools. Typically I look for a hint to provide these answers, however the hint is pretty lacking here:

Feature Request: Please provide a more elaborate explanation as to why AsRef or AsMut are so valueable, and why I would need to use them. Additionally, perhaps provide more unit tests also showcasing why I would want to use these two impls/methods.

(Just finished rustlings and really appreciate the work everyone has done on it! 🎉 💯 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions