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] [profile.dev]
split-debuginfo = "unpacked" split-debuginfo = "unpacked"

View file

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

View file

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