Skip to content
This repository has been archived by the owner on Jan 11, 2020. It is now read-only.

Commit

Permalink
Can compare against Tree / Tree command ERRs
Browse files Browse the repository at this point in the history
  • Loading branch information
Timidger committed Dec 9, 2016
1 parent 99e7997 commit b2642b1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/layout/actions/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use petgraph::graph::NodeIndex;
use rustwlc::WlcView;
use uuid::Uuid;

#[derive(Clone, Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum FocusError {
/// Reached a container where we can keep climbing the tree no longer.
///
Expand Down
2 changes: 1 addition & 1 deletion src/layout/actions/layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::super::commands::CommandResult;
use super::super::core::container::{Container, ContainerType, Layout};
use uuid::Uuid;

#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum LayoutErr {
/// The node behind the UUID was asked to ground when it was already grounded.
AlreadyGrounded(Uuid),
Expand Down
2 changes: 1 addition & 1 deletion src/layout/actions/movement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::super::commands::CommandResult;
use super::super::core::{Direction, ShiftDirection, TreeError};
use super::super::core::container::{Container, ContainerType, Handle, Layout};

#[derive(Debug, Clone)]
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum MovementError {
/// Attempted to move the node behind the UUID in the given direction,
/// which would cause it to leave its siblings.
Expand Down
2 changes: 1 addition & 1 deletion src/layout/actions/resize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use super::super::commands::{CommandResult};
use super::super::core::container::{ContainerType, MIN_SIZE};
use uuid::Uuid;

#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum ResizeErr {
/// Expected the node associated with the UUID to be floating.
ExpectedFloating(Uuid),
Expand Down
2 changes: 1 addition & 1 deletion src/layout/core/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct Action {
pub edges: ResizeEdge
}

#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum ActionErr {
/// Tried to start an action, but an action was already in progress
#[allow(dead_code)]
Expand Down
2 changes: 1 addition & 1 deletion src/layout/core/graph_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use super::path::{Path, PathBuilder};

use layout::{Container, ContainerType, Handle};

#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum GraphError {
/// These nodes were not siblings.
NotSiblings(NodeIndex, NodeIndex),
Expand Down
6 changes: 3 additions & 3 deletions src/layout/core/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use super::super::core::graph_tree::GraphError;

use super::super::commands::CommandResult;

#[derive(Clone, Copy, Debug)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum Direction {
Up,
Down,
Expand Down Expand Up @@ -70,7 +70,7 @@ impl Direction {
}
}

#[derive(Clone, Debug)]
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum TreeError {
/// A Node can not be found in the tree with this Node Handle.
NodeNotFound(Uuid),
Expand Down Expand Up @@ -1248,6 +1248,6 @@ pub mod tests {
tree.switch_to_workspace("3");
assert_eq!(tree.get_active_container().unwrap().get_type(), ContainerType::Container);
let uuid = tree.get_active_container().unwrap().get_id();
assert!(tree.float_container(uuid).is_ok());
assert_eq!(tree.float_container(uuid), Err(TreeError::InvalidOperationOnRootContainer(uuid)));
}
}

0 comments on commit b2642b1

Please sign in to comment.