From 95bb90240797907138047447106096d54382742c Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Fri, 2 Sep 2022 14:34:01 +0200 Subject: [PATCH] Make struct name more explicit --- crates/fj-kernel/src/algorithms/validate/coherence.rs | 8 ++++---- crates/fj-kernel/src/algorithms/validate/mod.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/validate/coherence.rs b/crates/fj-kernel/src/algorithms/validate/coherence.rs index 0588d1a89d..b227a6760b 100644 --- a/crates/fj-kernel/src/algorithms/validate/coherence.rs +++ b/crates/fj-kernel/src/algorithms/validate/coherence.rs @@ -24,7 +24,7 @@ pub fn validate_vertex( let distance = (local_as_global - global).magnitude(); if distance > max_distance { - Err(CoherenceMismatch { + Err(VertexCoherenceMismatch { local, local_as_global, global, @@ -39,14 +39,14 @@ pub fn validate_vertex( pub enum CoherenceIssues { /// Mismatch between the local and global coordinates of a vertex #[error("Mismatch between local and global coordinates of vertex")] - Vertex(#[from] CoherenceMismatch), + Vertex(#[from] VertexCoherenceMismatch), } /// A mismatch between the local and global forms of a vertex /// /// Used in [`CoherenceIssues`]. #[derive(Debug, Default, thiserror::Error)] -pub struct CoherenceMismatch { +pub struct VertexCoherenceMismatch { /// The local form of the object pub local: Point<1>, @@ -57,7 +57,7 @@ pub struct CoherenceMismatch { pub global: Point<3>, } -impl fmt::Display for CoherenceMismatch { +impl fmt::Display for VertexCoherenceMismatch { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!( f, diff --git a/crates/fj-kernel/src/algorithms/validate/mod.rs b/crates/fj-kernel/src/algorithms/validate/mod.rs index 616c3a4869..c9fc651c28 100644 --- a/crates/fj-kernel/src/algorithms/validate/mod.rs +++ b/crates/fj-kernel/src/algorithms/validate/mod.rs @@ -18,7 +18,7 @@ mod coherence; mod uniqueness; pub use self::{ - coherence::{CoherenceIssues, CoherenceMismatch}, + coherence::{CoherenceIssues, VertexCoherenceMismatch}, uniqueness::UniquenessIssues, };