Skip to content

Commit

Permalink
Has edits logic can go away
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Dec 14, 2023
1 parent b39fa0c commit 53a64a6
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions crates/re_viewport/src/space_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,6 @@ pub struct SpaceViewBlueprint {
pub entities_determined_by_user: bool,
}

/// Determine whether this `SpaceViewBlueprint` has user-edits relative to another `SpaceViewBlueprint`
impl SpaceViewBlueprint {
pub fn has_edits(&self, other: &Self) -> bool {
let Self {
id,
display_name,
class_identifier,
space_origin,
queries,
entities_determined_by_user,
} = self;

id != &other.id
|| display_name != &other.display_name
|| class_identifier != &other.class_identifier
|| space_origin != &other.space_origin
|| queries.iter().map(|q| q.id).collect::<HashSet<_>>()
!= other.queries.iter().map(|q| q.id).collect::<HashSet<_>>()
|| entities_determined_by_user != &other.entities_determined_by_user
}
}

impl SpaceViewBlueprint {
pub fn new(
space_view_class: SpaceViewClassIdentifier,
Expand Down

0 comments on commit 53a64a6

Please sign in to comment.