Skip to content

Commit

Permalink
Merge pull request #383 from dusk-network/rm-static-bound
Browse files Browse the repository at this point in the history
Remove `'static` bound on `emit` topics
  • Loading branch information
Eduardo Leegwater Simões authored Sep 4, 2024
2 parents a2e9c6d + f559d70 commit ff0bc64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions piecrust-uplink/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `emit_raw` and `feed_raw` functions
- Add `ContractError::DoesNotExist` variant

### Changed

- Remove `'static` bound on `emit` topics

## [0.16.0] - 2024-08-01

### Added
Expand Down
4 changes: 2 additions & 2 deletions piecrust-uplink/src/abi/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ pub fn spent() -> u64 {
}

/// Emits an event with the given data, serializing it using [`rkyv`].
pub fn emit<D>(topic: &'static str, data: D)
pub fn emit<D>(topic: &str, data: D)
where
for<'a> D: Serialize<StandardBufSerializer<'a>>,
{
Expand All @@ -322,7 +322,7 @@ where
}

/// Emits an event with the given data.
pub fn emit_raw(topic: &'static str, data: impl AsRef<[u8]>) {
pub fn emit_raw(topic: &str, data: impl AsRef<[u8]>) {
with_arg_buf(|buf| {
let data = data.as_ref();

Expand Down

0 comments on commit ff0bc64

Please sign in to comment.