fn test_rc_cyclic_with_zero_refs() {
    struct ZeroRefs {
        inner: Weak<ZeroRefs>,
    }

    let zero_refs = Rc::new_cyclic(|inner| {
        assert_eq!(inner.strong_count(), 0);
        assert!(inner.upgrade().is_none());
        ZeroRefs { inner: Weak::new() }
    });

    assert_eq!(Rc::strong_count(&zero_refs), 1);
    assert_eq!(Rc::weak_count(&zero_refs), 0);
    assert_eq!(zero_refs.inner.strong_count(), 0);
    assert_eq!(zero_refs.inner.weak_count(), 0);
}
A doubly-linked list with owned nodes.

The `LinkedList` allows pushing and popping elements at either end
in constant time.

NOTE: It is almost always better to use `Vec` or `VecDeque` because
array-based containers are generally faster,
more memory efficient,
benchmarks/haystacks/code/rust-library.rs