Skip to content

Commit

Permalink
Ignore LayerSet.path_set as an implementation detail
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Jul 13, 2022
1 parent b2fb04a commit 9e74dc6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub(crate) static DEFAULT_GLYPHS_DIRNAME: &str = "glyphs";
///
/// A layer set always includes a default layer, and may also include additional
/// layers.
#[derive(Debug, Clone, PartialEq)]
#[derive(Debug, Clone)]
pub struct LayerSet {
/// A collection of [`Layer`]s. The first [`Layer`] is the default.
layers: Vec<Layer>,
Expand All @@ -35,6 +35,13 @@ pub struct LayerSet {
path_set: HashSet<String>,
}

impl PartialEq for LayerSet {
fn eq(&self, other: &Self) -> bool {
// Ignore path_set as an implementation detail.
self.layers == other.layers
}
}

#[allow(clippy::len_without_is_empty)] // never empty
impl LayerSet {
/// Returns a [`LayerSet`] from the provided `path`.
Expand Down

0 comments on commit 9e74dc6

Please sign in to comment.