The manner in which the expression accomplishes this task is an
implementation detail.
You're welcome to draft a proposal if you think that you have an idea to
make this possible. Though all of the solutions that I can envision require
abandoning the idea of operators-as-traits and introducing a
I have a tree of Nodes where each node might have a name. I'm trying to
convert the tree into a HashMap of named nodes, but my code is getting
extremely complex due to the fact that I cannot pass mut HashMap around.
let mut named_nodes = HashMap::new();
let nodes = vec!( ... );
named_nodes =
On 2014-06-15, at 9:56, Benjamin Striegel ben.strie...@gmail.com wrote:
You're welcome to draft a proposal if you think that you have an idea to make
this possible.
The idea of the `stable` keyword was designed specifically as a bandage on the
current trait-system to allow a trait to say
I realized that, in my proposal, there's a potentially pretty confusing
asymmetry of what `stable` means. In the trait definition:
pub trait MulRHS, Result {
fn mul(stable self, rhs: RHS) - Result;
}
...the keyword `stable` means that however the type which implements this trait
decides to
After a few hints on IRC I managed to simplify it to:
fn collect_node_names(self, map: mut HashMapString, Gcnode::Node,
nodes: VecGcnode::Node) - bool {
for n in nodes.iter() {
if !self.collect_node_names(map, n.subnodes) {
return false;
}
match n.name {
Some(ref
On 6/12/14 11:15 AM, Tommi wrote:
But I think it will be easy to make the error of writing the explicit
.clone() in places where it's not needed. For example:
[...]
Would a compiler warning for unnecessary clones be feasible? useful?
Would it have false positives -- situations where a clone