Skip to content

Commit 6be512e

Browse files
committed
cleanup interface and build
Signed-off-by: Dave Huseby <[email protected]>
1 parent e955bf5 commit 6be512e

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

Cargo.toml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
[package]
22
name = "multitrait"
3-
version = "0.1.7"
3+
version = "0.1.8"
44
edition = "2021"
55
authors = ["Dave Huseby <[email protected]>"]
6-
description = "Multiformat traits"
6+
description = "Common traits for multiformats types"
77
repository = "https://github.com/cryptidtech/multitrait.git"
88
readme = "README.md"
99
license = "Apache-2.0"
1010

11+
[features]
12+
default = ["std"]
13+
std = ["unsigned-varint/std"]
14+
1115
[dependencies]
12-
thiserror = "1.0"
13-
unsigned-varint = { version = "0.8", features = ["std"] }
16+
thiserror = { version = "1.0", default-features = false }
17+
unsigned-varint = { version = "0.8", default-features = false }

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# multiutil
2-
Helpful traits and functions common to multi* types.
1+
# Multitrait
2+
Helpful traits and functions common to multicodec types.

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use thiserror::Error;
22

33
/// Errors generated by the numeric type impls
4-
#[derive(Clone, Debug, Error, PartialEq)]
4+
#[derive(Clone, Debug, Eq, Error, PartialEq)]
55
#[non_exhaustive]
66
pub enum Error {
77
/// an unsigned-varint error

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
//! # Multiutil
12
//!
3+
//! A set of traits that are helpful for implementing
4+
//! [multiformats](https://github.com/multiformats/multiformats) types in Rust.
25
#![warn(missing_docs)]
36
#![deny(
47
trivial_casts,
58
trivial_numeric_casts,
69
unused_import_braces,
710
unused_qualifications
811
)]
12+
#![cfg_attr(not(feature = "std"), no_std)]
13+
14+
#[cfg(not(feature = "std"))]
15+
extern crate alloc;
16+
17+
#[cfg(not(feature = "std"))]
18+
use alloc::vec::Vec;
919

1020
/// Errors generated from the implementations
1121
pub mod error;

0 commit comments

Comments
 (0)