blob: 66759ccd2781211c030c7f7f4dc38764ec7a3fe9 [file] [log] [blame]
//! Compatability implementations for deprecated graph traits.
#![allow(deprecated)]
use crate::{deprecated::visit::NodeRef, node::Node, storage::GraphStorage};
impl<S> NodeRef for Node<'_, S>
where
S: GraphStorage,
S::NodeId: Clone,
{
type NodeId = S::NodeId;
type Weight = S::NodeWeight;
fn id(&self) -> Self::NodeId {
self.id.clone()
}
fn weight(&self) -> &Self::Weight {
self.weight()
}
}