@@ -11,7 +11,7 @@ use thiserror::Error;
1111use tracing:: instrument;
1212
1313/// The set of nodes compromising a directed acyclic graph to be searched.
14- pub trait SearchGraph : Debug {
14+ pub trait Graph : Debug {
1515 /// The type of nodes in the graph. This should be cheap to clone.
1616 type Node : Clone + Debug + Hash + Eq ;
1717
@@ -272,16 +272,16 @@ pub enum Error2<Node, Error> {
272272}
273273
274274/// The error type for the search.
275- pub type Error < G > = Error2 < <G as SearchGraph >:: Node , <G as SearchGraph >:: Error > ;
275+ pub type Error < G > = Error2 < <G as Graph >:: Node , <G as Graph >:: Error > ;
276276
277277/// The search algorithm.
278278#[ derive( Clone , Debug ) ]
279- pub struct Search < G : SearchGraph > {
279+ pub struct Search < G : Graph > {
280280 graph : G ,
281281 nodes : IndexMap < G :: Node , Status > ,
282282}
283283
284- impl < G : SearchGraph > Search < G > {
284+ impl < G : Graph > Search < G > {
285285 /// Construct a new search.
286286 pub fn new ( graph : G , nodes : impl IntoIterator < Item = G :: Node > ) -> Self {
287287 let nodes = nodes
@@ -451,7 +451,7 @@ mod tests {
451451 max : usize ,
452452 }
453453
454- impl SearchGraph for UsizeGraph {
454+ impl Graph for UsizeGraph {
455455 type Node = usize ;
456456 type Error = Infallible ;
457457
@@ -602,7 +602,7 @@ mod tests {
602602 nodes : HashMap < char , HashSet < char > > ,
603603 }
604604
605- impl SearchGraph for TestGraph {
605+ impl Graph for TestGraph {
606606 type Node = char ;
607607 type Error = Infallible ;
608608
0 commit comments