Fix warnings

This commit is contained in:
elkowar 2024-02-17 15:06:04 +01:00
parent efea88598c
commit 1db7ff3bad
No known key found for this signature in database
GPG Key ID: 862BA3D7D7760F13
3 changed files with 3 additions and 1 deletions

View File

@ -54,4 +54,3 @@ wait-timeout = "0.2"
[profile.dev]
split-debuginfo = "unpacked"

View File

@ -69,6 +69,7 @@ impl<I: Copy + std::hash::Hash + std::cmp::Eq + std::fmt::Debug, T> OneToNElemen
result
}
#[cfg_attr(not(debug_assertions), allow(dead_code))]
pub fn validate(&self) -> Result<()> {
for (parent, children) in &self.parent_to_children {
for child in children {

View File

@ -110,6 +110,7 @@ impl ScopeGraph {
self.graph.remove_scope(scope_index);
}
#[cfg_attr(not(debug_assertions), allow(dead_code))]
pub fn validate(&self) -> Result<()> {
self.graph.validate()
}
@ -505,6 +506,7 @@ mod internal {
Ok(())
}
#[cfg_attr(not(debug_assertions), allow(dead_code))]
pub fn validate(&self) -> Result<()> {
for (child_scope, (parent_scope, _edge)) in &self.hierarchy_relations.child_to_parent {
if !self.scopes.contains_key(child_scope) {