Skip to content

Commit

Permalink
Merge #2408: Provide Amount & co in no-alloc
Browse files Browse the repository at this point in the history
ac26171 Clean up `no_std` usage (Martin Habovstiak)
fce03ce Provide `Amount` & co in no-alloc (Martin Habovstiak)

Pull request description:

  Using the crate without allocation was previously disabled making the
  crate empty without the feature. This chage makes it more fine-grained:
  it only disables string and float conversions which use allocator. We
  could later provide float conversions by using a sufficiently-long
  `ArrayString`.

  Note that this is API-breaking because we disallow calling the methods of the sealed `SerdeAmount` trait. However I think it should've been obvious that the thing is internal and calling them is not a great idea. (BTW I only learned this trick recently).

  Closes #2389

ACKs for top commit:
  apoelstra:
    ACK ac26171 maaybe `private` should be renamed to `internal_api` or something
  tcharding:
    ACK ac26171

Tree-SHA512: 2ca2ff11c3c362f868c3993b5698ace32e6ce2cf2e8028bc43fe65797eb2239b4841c1c722a0184a7c8f4afea3b475b1a049dd77fa30358cb742d60463018e9f
  • Loading branch information
apoelstra committed Jan 28, 2024
2 parents a38cdd5 + ac26171 commit d883c3d
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 76 deletions.

0 comments on commit d883c3d

Please sign in to comment.