mozilla/rust — pull request #4571 by thestinger (2013-01-22 02:04:20+00:00)
Title: (work in progress) more work on container traits

This adds a `Mutable` trait (with `clear`), and a `Map` trait implemented by `TreeMap` and `LinearMap` to replace to never implemented `SendMap` trait. The `Map` trait is incomplete at the moment (missing `find` for now - need to break `LinearMap`'s API and update users of it) and `TreeMap` will need to be extended to support `pop`, `get` and `consume` to make it on par with the current `LinearMap` anonymous implementation.

The `Map` and `Set` traits inherit from `Mutable`, but it doesn't actually seem to do anything at the moment (it still compiled before I added `Mutable` implementations) - doesn't seem to hurt though and should eventually start working as is.