Clean up some compilation warnings.
This commit is contained in:
parent
59e02dd89f
commit
f54651ec4d
@ -101,7 +101,7 @@ impl<T: Hash + Eq + Clone, S, A> Graph<T, S, A> {
|
||||
/// calling `add_arc` with the new vertex `VertexId`.
|
||||
fn add_raw_vertex(&mut self, data: S) -> &mut RawVertex<S> {
|
||||
self.vertices.push(RawVertex {
|
||||
data: data,
|
||||
data,
|
||||
parents: Vec::new(),
|
||||
children: Vec::new(),
|
||||
});
|
||||
@ -115,9 +115,9 @@ impl<T: Hash + Eq + Clone, S, A> Graph<T, S, A> {
|
||||
self.get_vertex_mut(source).children.push(arc_id);
|
||||
self.get_vertex_mut(target).parents.push(arc_id);
|
||||
self.arcs.push(RawEdge {
|
||||
data: data,
|
||||
source: source,
|
||||
target: target,
|
||||
data,
|
||||
source,
|
||||
target,
|
||||
});
|
||||
arc_id
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ where
|
||||
}
|
||||
}
|
||||
unsafe { new_data.set_len(retained_count) }; // TODO: Maybe do this after each swap?
|
||||
mem::replace(data, new_data);
|
||||
*data = new_data;
|
||||
}
|
||||
|
||||
/// Garbage collector state.
|
||||
@ -228,7 +228,7 @@ where
|
||||
arc_id_map[i].map(|id| id.as_usize())
|
||||
});
|
||||
// Reassign arc targets.
|
||||
for mut arc in self.graph.arcs.iter_mut() {
|
||||
for arc in self.graph.arcs.iter_mut() {
|
||||
arc.target = state_id_map[arc.target.as_usize()].unwrap();
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ impl<E: Error> Error for SearchError<E> {
|
||||
}
|
||||
}
|
||||
|
||||
fn cause(&self) -> Option<&Error> {
|
||||
fn cause(&self) -> Option<&dyn Error> {
|
||||
match *self {
|
||||
SearchError::SelectionError(ref e) => Some(e),
|
||||
_ => None,
|
||||
|
Loading…
Reference in New Issue
Block a user