Skip to content

Commit

Permalink
chore: update libs and examples to 2021 edition Rust (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinabell authored May 25, 2022
1 parent f4c6b61 commit c212e7c
Show file tree
Hide file tree
Showing 40 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion examples/callback-results/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "callback-results"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/callback-results/res/callback_results.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cross-contract-wrapper"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cross-contract-high-level"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion examples/cross-contract-calls/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "cross-contract-low-level"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/cross-contract-calls/res/cross_contract_high_level.wasm
Binary file not shown.
Binary file modified examples/cross-contract-calls/res/cross_contract_low_level.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/factory-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "factory-contract-wrapper"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/factory-contract/high-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "factory-contract-high-level"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion examples/factory-contract/low-level/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "factory-contract-low-level"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file not shown.
Binary file modified examples/factory-contract/res/factory_contract_low_level.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "fungible-token-wrapper"
version = "0.0.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/fungible-token/ft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "fungible-token"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
Binary file modified examples/fungible-token/res/defi.wasm
Binary file not shown.
Binary file modified examples/fungible-token/res/fungible_token.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/fungible-token/test-contract-defi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "defi"
version = "0.0.1"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]
Expand Down
2 changes: 1 addition & 1 deletion examples/lockable-fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "lockable-fungible-token"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/mission-control/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "mission-control"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/mission-control/res/mission_control.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/non-fungible-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "non-fungible-token-wrapper"
version = "0.0.2"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[dev-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/non-fungible-token/nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "non-fungible-token"
version = "1.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/non-fungible-token/res/approval_receiver.wasm
Binary file not shown.
Binary file modified examples/non-fungible-token/res/non_fungible_token.wasm
Binary file not shown.
Binary file modified examples/non-fungible-token/res/token_receiver.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "approval-receiver"
version = "0.0.1"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion examples/non-fungible-token/test-token-receiver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "token-receiver"
version = "0.0.1"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
2 changes: 1 addition & 1 deletion examples/status-message-collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "status-message-collections"
version = "0.2.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/status-message/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "status-message"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/status-message/res/status_message.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion examples/test-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "test-contract"
version = "0.1.0"
authors = ["Near Inc <hello@nearprotocol.com>"]
edition = "2018"
edition = "2021"

[lib]
crate-type = ["cdylib"]
Expand Down
Binary file modified examples/test-contract/res/test_contract.wasm
Binary file not shown.
Binary file modified examples/versioned/res/versioned.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion near-contract-standards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "near-contract-standards"
version = "4.0.0-pre.9"
authors = ["Near Inc <hello@near.org>"]
edition = "2018"
edition = "2021"
license = "GPL-3.0"
categories = ["wasm"]
repository = "https://github.com/near/near-sdk-rs"
Expand Down
2 changes: 1 addition & 1 deletion near-sdk-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "near-sdk-macros"
version = "4.0.0-pre.9"
authors = ["Near Inc <max@nearprotocol.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
categories = ["wasm"]
repository = "https://github.com/near/near-sdk-rs"
Expand Down
4 changes: 2 additions & 2 deletions near-sdk-macros/src/core_impl/code_generator/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub(crate) fn generate_ext_structs(
if let Some(generics) = generic_details {
// If ext generation is on struct, make ext function associated with struct not module
ext_code = quote! {
impl#generics #ident#generics {
impl #generics #ident #generics {
#ext_code
}
};
Expand Down Expand Up @@ -90,7 +90,7 @@ fn generate_ext_function(attr_signature_info: &AttrSigInfo) -> TokenStream2 {
let Signature { generics, .. } = original_sig;
quote! {
#new_non_bindgen_attrs
pub fn #ident#generics(self, #pat_type_list) -> near_sdk::Promise {
pub fn #ident #generics(self, #pat_type_list) -> near_sdk::Promise {
let __args = #serialize;
near_sdk::Promise::new(self.account_id)
.function_call_weight(
Expand Down
2 changes: 1 addition & 1 deletion near-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "near-sdk"
version = "4.0.0-pre.9"
authors = ["Near Inc <max@nearprotocol.com>"]
edition = "2018"
edition = "2021"
license = "GPL-3.0"
readme = "README.md"
categories = ["wasm"]
Expand Down
2 changes: 1 addition & 1 deletion sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "near-sys"
version = "0.2.0"
authors = ["Near Inc <hello@near.org>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
categories = ["wasm"]
repository = "https://github.com/near/near-sdk-rs"
Expand Down

0 comments on commit c212e7c

Please sign in to comment.