From aa7edaf92b4dce13834b0d0190417bcba8a699dc Mon Sep 17 00:00:00 2001 From: Filipe Rodrigues Date: Sat, 19 Sep 2020 23:38:08 +0100 Subject: [PATCH] Fixed bounds on `Bytes`'s associated types. --- src/game/bytes.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/game/bytes.rs b/src/game/bytes.rs index 7ecda13..f2865b5 100644 --- a/src/game/bytes.rs +++ b/src/game/bytes.rs @@ -1,7 +1,7 @@ //! Interface for converting various structures to and from bytes // Imports -use std::{error::Error, fmt::Debug}; +use std::error::Error; /// Conversions to and from bytes for the game file pub trait Bytes @@ -9,15 +9,13 @@ where Self: Sized, { /// The type of array required by this structure - /// - /// *MUST* be a `[u8; N]` or `u8` - type ByteArray: ByteArray + Sized; + type ByteArray: ByteArray; /// The error type used for the operation - type FromError: Debug + Error; + type FromError: Error; /// The error type used for the operation - type ToError: Debug + Error; + type ToError: Error; /// Constructs this structure from `bytes` fn from_bytes(bytes: &Self::ByteArray) -> Result;