aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG6
-rw-r--r--src/annotation/mod.rs7
-rw-r--r--src/color.rs4
-rw-r--r--src/reader.rs2
4 files changed, 14 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index b80a7de..f57390d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,8 +4,14 @@ TODO: Reader::next_n should return the number of items read as Err(ReadError::In
TODO: Reader::offset should return an AddressDiff<Address>, not a bare Address
TODO: impls of `fn one` and `fn zero` so downstream users don't have to import num_traits directly
+## 0.2.8
+
added an impl of `From<ReadError>` for `StandardPartialDecoderError`, matching the existing `StandardDecodeError` impl.
+moved a use of `serde` types to be covered by the relevant cfg flag; using `colors` without `serde` (unlikely) now actually builds.
+
+fixed up doc comments to build without error.
+
## 0.2.7
moved `AnnotatingDecoder` and its associated types to `annotation/`, for module-level documentation about that feature.
diff --git a/src/annotation/mod.rs b/src/annotation/mod.rs
index 0139cf3..0248b94 100644
--- a/src/annotation/mod.rs
+++ b/src/annotation/mod.rs
@@ -19,6 +19,11 @@
//! in a generic setting, there isn't much to do with a `FieldDescription` other than display it. a
//! typical use might look something like:
//! ```
+//! use core::fmt;
+//!
+//! use yaxpeax_arch::annotation::{AnnotatingDecoder, VecSink};
+//! use yaxpeax_arch::{Arch, Reader, U8Reader};
+//!
//! fn show_field_descriptions<A: Arch>(decoder: A::Decoder, buf: &[u8])
//! where
//! A::Decoder: AnnotatingDecoder<A>,
@@ -32,7 +37,7 @@
//!
//! println!("decoded instruction {}", inst);
//! for (start, end, desc) in sink.records.iter() {
-//! println(" bits [{}, {}]: {}", start, end, desc);
+//! println!(" bits [{}, {}]: {}", start, end, desc);
//! }
//! }
//! ```
diff --git a/src/color.rs b/src/color.rs
index c35f482..d50ec8b 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -136,12 +136,10 @@ mod termion_color {
use crossterm::style;
- use serde::Serialize;
-
use crate::color::{Colored, YaxColors};
#[cfg(feature="use-serde")]
- impl Serialize for ColorSettings {
+ impl serde::Serialize for ColorSettings {
fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
use serde::ser::SerializeStruct;
let s = serializer.serialize_struct("ColorSettings", 0)?;
diff --git a/src/reader.rs b/src/reader.rs
index c853a77..028d835 100644
--- a/src/reader.rs
+++ b/src/reader.rs
@@ -1,4 +1,4 @@
-use crate::StandardDecodeError;
+use crate::{StandardDecodeError, StandardPartialDecoderError};
impl From<ReadError> for StandardDecodeError {
fn from(_: ReadError) -> StandardDecodeError {