From 25753064b4143f1c250842e910f360c027bbcb1b Mon Sep 17 00:00:00 2001 From: Anton Maminov Date: Mon, 12 Dec 2022 21:14:24 +0200 Subject: [PATCH] v0.4.1 --- shard.yml | 2 +- src/dijkstra.cr | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shard.yml b/shard.yml index 753f4a1..064fe4b 100644 --- a/shard.yml +++ b/shard.yml @@ -1,5 +1,5 @@ name: dijkstra -version: 0.4.0 +version: 0.4.1 authors: - Anton Maminov diff --git a/src/dijkstra.cr b/src/dijkstra.cr index 6f9b382..e289035 100644 --- a/src/dijkstra.cr +++ b/src/dijkstra.cr @@ -37,6 +37,8 @@ module Dijkstra return if source == @current_source + @current_source = source + q = Priority::Queue(T).new @vertices.each do |v|