From 97bef041ee3ef8db0c42419c63003d2ab66cd7b7 Mon Sep 17 00:00:00 2001 From: Richard Leek Date: Fri, 26 Jul 2024 06:16:45 +0200 Subject: [PATCH] Fix tests and version bump --- Cargo.toml | 2 +- src/data/eo_reader.rs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e452dfb..32e4ce8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "eolib" -version = "1.0.0-RC9" +version = "1.0.0-RC10" authors = ["Richard Leek "] description = "A core rust library for writing applications related to Endless Online" edition = "2021" diff --git a/src/data/eo_reader.rs b/src/data/eo_reader.rs index 2d0ae95..37929be 100644 --- a/src/data/eo_reader.rs +++ b/src/data/eo_reader.rs @@ -32,10 +32,10 @@ impl From for EoReaderError { /// let data = Bytes::from_static(&[1, 43, 11, 254]); /// let reader = EoReader::new(data); /// -/// assert_eq!(reader.get_byte().unwrap(), 1); -/// assert_eq!(reader.get_char().unwrap(), 42); -/// assert_eq!(reader.get_short().unwrap(), 10); -/// assert_eq!(reader.remaining().unwrap(), 0); +/// assert_eq!(reader.get_byte(), 1); +/// assert_eq!(reader.get_char(), 42); +/// assert_eq!(reader.get_short(), 10); +/// assert_eq!(reader.remaining(), 0); /// ``` /// /// ## Chunked reading mode @@ -51,19 +51,19 @@ impl From for EoReaderError { /// /// // Reads an integer (4 bytes) but only advances the cursor by one byte, accounting for /// // the first chunk being a single byte. -/// assert_eq!(reader.get_int().unwrap(), 42); +/// assert_eq!(reader.get_int(), 42); /// /// // Advances the cursor to the next chunk /// reader.next_chunk().unwrap(); /// -/// assert_eq!(reader.get_string().unwrap(), "Hello"); +/// assert_eq!(reader.get_string(), "Hello"); /// /// // Advances the cursor to the next chunk /// reader.next_chunk().unwrap(); /// /// // Reads an integer (4 bytes) but only advances the cursor by one byte, accounting for /// // the last chunk -/// assert_eq!(reader.get_int().unwrap(), 1); +/// assert_eq!(reader.get_int(), 1); /// ```` pub struct EoReader { data: Bytes,