start fixing examples and cleaning up interface

This commit is contained in:
Tadeo hepperle
2024-02-02 16:50:41 +01:00
parent 4e2d3fd9cf
commit fce85c4af0
20 changed files with 48 additions and 95 deletions
+8
View File
@@ -78,3 +78,11 @@ unsafe impl<T> Sync for PhantomDataSendSync<T> {}
/// with collections like BTreeMap. This has the same type params
/// as `BTreeMap` which allows us to easily swap the two during codegen.
pub type KeyedVec<K, V> = Vec<(K, V)>;
/// A unit marker struct signalling that some property is true
pub struct Yes;
/// A quick helper to encode some bytes to hex.
pub fn to_hex(bytes: impl AsRef<[u8]>) -> String {
alloc::format!("0x{}", hex::encode(bytes.as_ref()))
}