From 1302963b566f1bb082c2a77d585bf31902e791a5 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sat, 30 Sep 2023 16:09:36 +0200 Subject: [PATCH] Issue #8: Use system library content as equal content Since system library content is already present in OS database, it is no dependencies to be imported. --- src/model/data_form.rs | 5 ++++- src/model/unterformular.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/model/data_form.rs b/src/model/data_form.rs index 45e5116..436ed1a 100644 --- a/src/model/data_form.rs +++ b/src/model/data_form.rs @@ -255,7 +255,10 @@ impl Comparable for DataForm { } fn compare_by_requirement(a: &Self, b: &Self) -> Ordering { - if a.get_name() == b.get_name() { + if a.get_name() == b.get_name() + || a.is_system_library_content() + || b.is_system_library_content() + { return Ordering::Equal; } diff --git a/src/model/unterformular.rs b/src/model/unterformular.rs index 92cc9c5..60d4ceb 100644 --- a/src/model/unterformular.rs +++ b/src/model/unterformular.rs @@ -259,7 +259,10 @@ impl Comparable for Unterformular { } fn compare_by_requirement(a: &Self, b: &Self) -> Ordering { - if a.get_name() == b.get_name() { + if a.get_name() == b.get_name() + || a.is_system_library_content() + || b.is_system_library_content() + { return Ordering::Equal; }