This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! A doubly-linked list in 50 LOCs of stable and safe Rust. | |
// Backup-fork of https://play.rust-lang.org/?gist=c3db81ec94bf231b721ef483f58deb35 | |
use std::cell::RefCell; | |
use std::rc::{Rc, Weak}; | |
use std::fmt::Display; | |
// The node type stores the data and two pointers. | |
// | |
// It uses Option to represent nullability in safe Rust. It has zero overhead | |
// over a null pointer due to the NonZero optimization. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run = "dart run" | |
[packager] | |
language = "dart-pub.dev" | |
[packager.features] | |
packageSearch = true | |
guessImports = false | |
[languages.dart] |