Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
bcc296f5
Commit
bcc296f5
authored
7 years ago
by
nanocryk
Browse files
Options
Downloads
Patches
Plain Diff
[fix] Keep less then k_max distance paths
parent
9fdc469e
No related branches found
No related tags found
1 merge request
!29
Resolve "RustyWot : get_paths is stuck in an infinite loop !"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
wotb/rusty.rs
+14
-6
14 additions, 6 deletions
wotb/rusty.rs
with
14 additions
and
6 deletions
wotb/rusty.rs
+
14
−
6
View file @
bcc296f5
...
...
@@ -260,13 +260,21 @@ impl WebOfTrust for RustyWebOfTrust {
let
mut
new_paths
=
vec!
[];
for
path
in
&
paths
{
let
sources
=
&
graph
[
path
.last
()
.unwrap
()
.0
];
let
node
=
path
.last
()
.unwrap
();
if
node
==
&
to
{
// If path is complete, we keep it.
new_paths
.push
(
path
.clone
())
}
else
{
// If not complete we comlete paths
let
sources
=
&
graph
[
node
.0
];
for
source
in
&
sources
.1
{
let
mut
new_path
=
path
.clone
();
new_path
.push
(
NodeId
(
*
source
));
new_paths
.push
(
new_path
);
}
}
}
paths
=
new_paths
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment