Skip to content

Commit

Permalink
Merge branch 'master' into kyle/candid-wasm-bindgen
Browse files Browse the repository at this point in the history
  • Loading branch information
krpeacock authored Oct 4, 2022
2 parents bbfb917 + e85401f commit 3aeda0c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# Changelog

## 2022-10-04 (Rust 0.8.1)

* Fix: missing impl serde traits for `Principal`

## 2022-09-27 (Rust 0.8.0)

* Move `Principal` into this crate, no more re-export `ic-types`
Expand Down
2 changes: 1 addition & 1 deletion rust/candid/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "candid"
version = "0.8.0"
version = "0.8.1"
edition = "2018"
authors = ["DFINITY Team"]
description = "Candid is an interface description language (IDL) for interacting with canisters running on the Internet Computer."
Expand Down
8 changes: 4 additions & 4 deletions rust/candid/src/types/principal.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use super::{CandidType, Serializer, Type, TypeId};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha224};
use std::convert::TryFrom;
use std::fmt::Write;
use thiserror::Error;

/// An error happened while encoding, decoding or serializing a [`Principal`].
#[derive(Error, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Error, Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
pub enum PrincipalError {
#[error("Bytes is longer than 29 bytes.")]
BytesTooLong(),
Expand Down Expand Up @@ -52,8 +52,8 @@ pub enum PrincipalError {
/// assert_eq!(principal.to_text(), text);
/// ```
///
/// Serialization is enabled with the "serde" feature. It supports serializing
/// to a byte bufer for non-human readable serializer, and a string version for human
/// Similarly, serialization using serde has two versions:
/// serilizing to a byte bufer for non-human readable serializer, and a string version for human
/// readable serializers.
///
/// ```
Expand Down

0 comments on commit 3aeda0c

Please sign in to comment.