From f3ee07416dbdb521bcf325a3425440aac3846b7c Mon Sep 17 00:00:00 2001 From: edef Date: Thu, 16 Apr 2015 07:27:14 -0400 Subject: [PATCH] require Stack::Error to implement Debug + Display --- src/stack.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stack.rs b/src/stack.rs index ff2e390..2fb06df 100644 --- a/src/stack.rs +++ b/src/stack.rs @@ -2,6 +2,7 @@ // See the LICENSE file included in this distribution. //! Traits for stacks. use core::prelude::*; +use core::fmt::{Debug, Display}; /// A trait for objects that hold ownership of a stack. pub trait Stack { @@ -18,6 +19,6 @@ pub trait Stack { /// A trait for objects that provide stacks of arbitrary size. pub trait StackSource { type Output: Stack; - type Error = (); + type Error: Debug + Display = (); fn get_stack(size: usize) -> Result; }