chiark / gitweb /
gamestate: Further improve error printing
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 19:57:16 +0000 (20:57 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 20:08:23 +0000 (21:08 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/gamestate.rs

index 65adb3a95e2db2f5d5ee4816c8f41208607b2851..9a7d4056f28f1e67d8fdbff4c46786e504f55e0c 100644 (file)
@@ -331,8 +331,8 @@ impl Timestamp {
 }
 
 #[derive(Error,Debug,Copy,Clone)]
+#[error("position off table")]
 pub struct PosOffTableError<T:Debug> { pub clamped: T }
-display_as_debug!{PosOffTableError<T>, <T:Debug>}
 
 pub trait ClampTable: Sized+Debug {
   fn clamped(self, range: Self) -> Result<Self, PosOffTableError<Self>>;