Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename NodeNotFound to BuilderNotFound
Browse files Browse the repository at this point in the history
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
koonpeng committed Jan 3, 2025
1 parent ca56917 commit 01d3bb6
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/diagram.rs
Original file line number Diff line number Diff line change
@@ -399,7 +399,7 @@ impl Diagram {

#[derive(Debug)]
pub enum DiagramError {
NodeNotFound(BuilderId),
BuilderNotFound(BuilderId),
OperationNotFound(OperationId),
TypeMismatch,
MissingStartOrTerminate,
@@ -418,7 +418,7 @@ pub enum DiagramError {
impl Display for DiagramError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::NodeNotFound(node_id) => write!(f, "node [{}] is not registered", node_id),
Self::BuilderNotFound(builder_id) => write!(f, "node builder [{}] is not registered", builder_id),
Self::OperationNotFound(op_id) => write!(f, "operation [{}] not found", op_id),
Self::TypeMismatch => f.write_str("output type does not match input type"),
Self::MissingStartOrTerminate => f.write_str("missing start or terminate"),
2 changes: 1 addition & 1 deletion src/diagram/node_registry.rs
Original file line number Diff line number Diff line change
@@ -594,7 +594,7 @@ impl NodeRegistry {
let k = id.borrow();
self.nodes
.get(k)
.ok_or(DiagramError::NodeNotFound(k.to_string()))
.ok_or(DiagramError::BuilderNotFound(k.to_string()))
}
}

0 comments on commit 01d3bb6

Please sign in to comment.