Skip to content

Commit 7e4b625

Browse files
authored
Merge pull request #1148 from dfinity/chore/bump-ic-cdk-version
Chore/bump-ic-cdk-version
2 parents da4f44a + 2a48e85 commit 7e4b625

File tree

27 files changed

+1598
-14088
lines changed

27 files changed

+1598
-14088
lines changed

rust/counter/Cargo.lock

Lines changed: 76 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/counter/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@ version = "1.1.1"
77
crate-type = ["cdylib"]
88

99
[dependencies]
10-
candid = "0.10.13"
11-
ic-cdk = "0.18.0"
12-
ic-cdk-macros = "0.18.0"
10+
candid = "0.10.14"
11+
ic-cdk = "0.18.3"

rust/counter/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ thread_local! {
66
}
77

88
/// Get the value of the counter.
9-
#[ic_cdk_macros::query]
9+
#[ic_cdk::query]
1010
fn get() -> Nat {
1111
COUNTER.with(|counter| (*counter.borrow()).clone())
1212
}
1313

1414
/// Set the value of the counter.
15-
#[ic_cdk_macros::update]
15+
#[ic_cdk::update]
1616
fn set(n: Nat) {
1717
// COUNTER.replace(n); // requires #![feature(local_key_cell_methods)]
1818
COUNTER.with(|count| *count.borrow_mut() = n);
1919
}
2020

21-
#[ic_cdk_macros::update]
21+
#[ic_cdk::update]
2222
fn get_and_set(n: Nat) -> Nat {
2323
COUNTER.with(|counter| {
2424
let old = counter.borrow().clone();
@@ -28,7 +28,7 @@ fn get_and_set(n: Nat) -> Nat {
2828
}
2929

3030
/// Increment the value of the counter.
31-
#[ic_cdk_macros::update]
31+
#[ic_cdk::update]
3232
fn inc() {
3333
COUNTER.with(|counter| *counter.borrow_mut() += 1_u32);
3434
}

0 commit comments

Comments
 (0)