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