Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- stable
- beta
- nightly
- 1.58.0 # MSRV
- 1.81.0 # MSRV

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[package]
name = "cbor_event"
version = "3.0.0"
edition = "2015"
rust-version = "1.81"
authors = ["Nicolas Di Prima <nicolas@primetype.co.uk>", "Vincent Hanquez <vincent@typed.io>"]
license = "MIT OR Apache-2.0"
readme = "README.md"
Expand Down
1 change: 0 additions & 1 deletion src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ impl<T: Deserialize> Deserialize for Option<T> {
/// or unsupported format;
/// - `Error::IndefiniteLenUnsupported(t)`: the Indefinite length is not
/// supported for the given [`Type`] `t`;
/// - `Error::IoError(io_error)`: error due relating to buffer management;
///
/// # Panic
///
Expand Down
9 changes: 9 additions & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,12 @@ impl fmt::Display for Error {
}
}
}

impl core::error::Error for Error {
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
match self {
Error::InvalidTextError(error) => Some(error),
_ => None,
}
}
}
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
//! [`Deserialize`]: ./de/trait.Deserialize.html
//! [`Serializer`]: ./se/struct.Serializer.html
//! [`Serialize`]: ./se/trait.Serialize.html
//! [`std::io::Write`]: https://doc.rust-lang.org/std/io/trait.Write.html
//! [`Error`]: ./enum.Error.html
//! [`Type`]: ./enum.Type.html
//!
Expand Down Expand Up @@ -43,9 +42,8 @@
//! ## Serialisation: [`Serializer`]
//!
//! To serialise your objects into CBOR we provide a simple object
//! [`Serializer`]. It is configurable with any [`std::io::Write`]
//! objects. [`Serializer`] is meant to be simple to use and to have
//! limited overhead.
//! [`Serializer`]. It is meant to be simple to use and to have limited
//! overhead.
//!
//! ```
//! use cbor_event::se::{Serializer};
Expand Down
3 changes: 1 addition & 2 deletions src/se.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ where
// every _reserve_ calls.
const DEFAULT_CAPACITY: usize = 512;

/// simple CBOR serializer into any
/// [`std::io::Write`](https://doc.rust-lang.org/std/io/trait.Write.html).
/// simple CBOR serializer into an owned byte buffer.
///
#[derive(Debug)]
pub struct Serializer {
Expand Down
Loading