Skip to content

Commit

Permalink
Remove set_ prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Apr 25, 2024
1 parent 18ef64a commit 80be776
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Parse for Options {
/// #
/// # type MigrateMsg = ();
/// #[entry_point]
/// #[set_state_version(2)]
/// #[state_version(2)]
/// pub fn migrate(deps: DepsMut, env: Env, msg: MigrateMsg) -> StdResult<Response> {
/// todo!();
/// }
Expand All @@ -123,7 +123,7 @@ fn expand_attributes(func: &mut ItemFn) -> syn::Result<TokenStream> {
let attributes = std::mem::take(&mut func.attrs);
let mut stream = TokenStream::new();
for attribute in attributes {
if !attribute.path().is_ident("set_state_version") {
if !attribute.path().is_ident("state_version") {
func.attrs.push(attribute);
continue;
}
Expand Down Expand Up @@ -195,7 +195,7 @@ mod test {
#[test]
fn contract_state_version_in_u64() {
let code = quote! {
#[set_state_version(0xDEAD_BEEF_FFFF_DEAD_2BAD)]
#[state_version(0xDEAD_BEEF_FFFF_DEAD_2BAD)]
fn migrate(deps: DepsMut, env: Env, msg: MigrateMsg) -> Response {
// Logic here
}
Expand All @@ -212,7 +212,7 @@ mod test {
#[test]
fn contract_state_version_expansion() {
let code = quote! {
#[set_state_version(2)]
#[state_version(2)]
fn migrate(deps: DepsMut, env: Env, msg: MigrateMsg) -> Response {
// Logic here
}
Expand Down

0 comments on commit 80be776

Please sign in to comment.