Rc and RefCell Smart Pointers - Rust

Поделиться
HTML-код
  • Опубликовано: 25 авг 2024

Комментарии • 12

  • @anujdhiman6640
    @anujdhiman6640 2 месяца назад

    Hi Danlogs, Nice explanation but i would recommend one thing to show output automatically without cargo run , install cargo watch and run he command - cargo watch -q -c -x 'run -q'
    It will save your time in video too.

  • @MrMurilosopa
    @MrMurilosopa 2 года назад +1

    Great explanation! Thank you :)

  • @flippert0
    @flippert0 7 месяцев назад

    Great insights, thanks!

  • @luiscarlosjayk
    @luiscarlosjayk 4 месяца назад

    Nice explanation!!!

  • @davec8385
    @davec8385 2 года назад

    Thanks for the great video! I hope you have a great rest of your day

  • @waterearth8562
    @waterearth8562 2 года назад +1

    consider use nerd fonts so the unicode before master will show. Also, try rust-analyzer. :)

    • @danlogs
      @danlogs  2 года назад

      Thanks for the suggestions~ I normally do use them, but this is a new computer and I didn't notice them missing until after the recording 😅

  • @MatManugas
    @MatManugas 2 года назад +1

    the future ruiner of JavaScript, I love it!

  • @markday3145
    @markday3145 Год назад

    3:50 Wouldn't n3.clone() work just as well as Rc::clone(&n3) ? The first looks a little cleaner to me. But is there a reason to prefer the second form?

    • @danlogs
      @danlogs  Год назад +2

      They're equivalent in terms of functionality, but some may argue that one could be more readable than the other (i.e., 𝚁𝚌::𝚌𝚕𝚘𝚗𝚎(&𝚗𝟹) is clearer in its intent of simply creating a shared reference and not a deep clone the data as .𝚌𝚕𝚘𝚗𝚎() sometimes does.)

  • @roxferesr
    @roxferesr Месяц назад

    You are passing Referenced to the RC.... Wouldn't just using references work in the original code without the RC