diff options
author | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:42:28 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-01-06 23:42:28 +0800 |
commit | f27d604d93ce583d4404e1874664e08382ea2f00 (patch) | |
tree | 6fa8df26af954e94f3604ffabde4961ee8108c41 /graph/src/error.rs | |
parent | 7dd4935230e303aef8d295d992239d59d95b32d7 (diff) |
Save before system restart.
I am about to re-start my system, so I save before any crashes
happen.
Diffstat (limited to 'graph/src/error.rs')
-rw-r--r-- | graph/src/error.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graph/src/error.rs b/graph/src/error.rs index bf2714b..ce45acc 100644 --- a/graph/src/error.rs +++ b/graph/src/error.rs @@ -18,6 +18,8 @@ pub enum Error { /// The graph does not permit duplicate edges but encounters a /// repeated edge. DuplicatedEdge(usize, usize), + /// The source node has no room to add a new edge. + FullNode(usize), } impl Display for Error { @@ -35,6 +37,7 @@ impl Display for Error { "No duplicate edges permitted, but found one from {source} to {target}" ) } + Error::FullNode(index) => write!(f, "the node {index} has no room for new edges"), } } } |