Skip to content

Commit

Permalink
meta: minors fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Mar 27, 2024
1 parent 4dc8f5e commit 9b50cd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions fundamentals/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ pub mod types;
pub mod prelude {
pub use crate::bitflag::*;
pub use crate::bolt::*;
#[allow(unused_imports)]
pub use crate::primitives::*;
pub use crate::tlv::*;
pub use crate::types::*;

// FIXME: make this a not std compatible
#[macro_export]
macro_rules! error {
($($msg:tt)*) => {{
Expand Down
10 changes: 5 additions & 5 deletions fundamentals/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ use crate::prelude::*;
/// generate a ToWire and FromWire trait on basic
/// types that will be used in the `derive` proc macro.
///
/// EXPAND
/// EXPAND:
///
/// ```ingore
/// type Foo = [u8, 32];
///
Expand All @@ -20,12 +21,11 @@ use crate::prelude::*;
/// }
///
/// impl FromWire for Foo {
/// fn from_write<W: Read>(reader: &mut R) -> Result<(), Error> {
/// fn from_wire<R: Read>(reader: &mut R) -> std::io::Result<Self> {
/// // note that we know tha side here that is 32
/// let mut buffer = [0; 32];
/// // FIXME: returnt the error in the `FromWire`
/// let _ = reader.read(&mut buffer).unwrap();
/// buffer
/// reader.read_exact(&mut buff)?;
/// Ok(buff)
/// }
/// }
/// ```
Expand Down

0 comments on commit 9b50cd9

Please sign in to comment.