Skip to content

RustRust borrow checker vs my linked list (again)

Answered
Started bylunarcanyon101views1replynextjspostgres
  1. 1 year at OasisL6
    #1

    Trying to write a doubly linked list to learn Rust and I'm stuck on "cannot borrow as mutable more than once". Is there a simple way, or should I give up on this exercise?

  2. 1 year at OasisL38
    #2

    Doubly linked lists are famously the hardest beginner exercise in Rust. Try a singly linked list with Option<Box<Node>> first, it teaches the same ownership lessons without the pain.

Sign in to reply

Join the conversation: sign in or create an account to reply.