浏览代码

Bump up rust to 2021 edition (#1430)

SchwarzBier 3 年之前
父节点
当前提交
97a8dfe71d
共有 55 个文件被更改,包括 110 次插入57 次删除
  1. 2 1
      avm/Cargo.toml
  2. 2 1
      cli/Cargo.toml
  3. 2 1
      client/Cargo.toml
  4. 2 1
      client/example/Cargo.toml
  5. 2 1
      examples/tutorial/basic-0/programs/basic-0/Cargo.toml
  6. 2 1
      examples/tutorial/basic-1/programs/basic-1/Cargo.toml
  7. 2 1
      examples/tutorial/basic-2/programs/basic-2/Cargo.toml
  8. 2 1
      examples/tutorial/basic-3/programs/puppet-master/Cargo.toml
  9. 2 1
      examples/tutorial/basic-3/programs/puppet/Cargo.toml
  10. 2 1
      examples/tutorial/basic-4/programs/basic-4/Cargo.toml
  11. 2 1
      lang/Cargo.toml
  12. 2 1
      lang/attribute/access-control/Cargo.toml
  13. 2 1
      lang/attribute/account/Cargo.toml
  14. 2 1
      lang/attribute/constant/Cargo.toml
  15. 2 1
      lang/attribute/error/Cargo.toml
  16. 2 1
      lang/attribute/event/Cargo.toml
  17. 2 1
      lang/attribute/interface/Cargo.toml
  18. 2 1
      lang/attribute/program/Cargo.toml
  19. 2 1
      lang/attribute/state/Cargo.toml
  20. 2 1
      lang/derive/accounts/Cargo.toml
  21. 2 1
      lang/syn/Cargo.toml
  22. 3 3
      lang/syn/src/codegen/accounts/__cpi_client_accounts.rs
  23. 1 1
      lang/syn/src/codegen/accounts/to_account_metas.rs
  24. 2 1
      spl/Cargo.toml
  25. 2 1
      tests/bpf-upgradeable-state/programs/bpf-upgradeable-state/Cargo.toml
  26. 2 1
      tests/cashiers-check/programs/cashiers-check/Cargo.toml
  27. 2 1
      tests/cfo/programs/cfo/Cargo.toml
  28. 2 1
      tests/chat/programs/chat/Cargo.toml
  29. 2 1
      tests/composite/programs/composite/Cargo.toml
  30. 2 1
      tests/custom-coder/programs/custom-coder/Cargo.toml
  31. 2 1
      tests/custom-coder/programs/spl-token/Cargo.toml
  32. 2 1
      tests/errors/programs/errors/Cargo.toml
  33. 2 1
      tests/escrow/programs/escrow/Cargo.toml
  34. 2 1
      tests/events/programs/events/Cargo.toml
  35. 2 1
      tests/ido-pool/programs/ido-pool/Cargo.toml
  36. 2 1
      tests/interface/programs/counter-auth/Cargo.toml
  37. 2 1
      tests/interface/programs/counter/Cargo.toml
  38. 2 1
      tests/lockup/programs/lockup/Cargo.toml
  39. 2 1
      tests/lockup/programs/registry/Cargo.toml
  40. 2 1
      tests/misc/programs/misc/Cargo.toml
  41. 2 1
      tests/misc/programs/misc2/Cargo.toml
  42. 2 1
      tests/misc/programs/shared/Cargo.toml
  43. 2 1
      tests/multisig/programs/multisig/Cargo.toml
  44. 2 1
      tests/pda-derivation/programs/pda-derivation/Cargo.toml
  45. 2 1
      tests/pyth/programs/pyth/Cargo.toml
  46. 2 1
      tests/spl/token-proxy/programs/token-proxy/Cargo.toml
  47. 2 1
      tests/swap/programs/swap/Cargo.toml
  48. 2 1
      tests/system-accounts/programs/system-accounts/Cargo.toml
  49. 2 1
      tests/sysvars/programs/sysvars/Cargo.toml
  50. 2 1
      tests/tictactoe/programs/tictactoe/Cargo.toml
  51. 2 1
      tests/typescript/programs/shared/Cargo.toml
  52. 2 1
      tests/typescript/programs/typescript/Cargo.toml
  53. 2 1
      tests/zero-copy/programs/shared/Cargo.toml
  54. 2 1
      tests/zero-copy/programs/zero-copy/Cargo.toml
  55. 2 1
      tests/zero-copy/programs/zero-cpi/Cargo.toml

+ 2 - 1
avm/Cargo.toml

@@ -1,7 +1,8 @@
 [package]
 name = "avm"
 version = "0.22.1"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [[bin]]
 name = "avm"

+ 2 - 1
cli/Cargo.toml

@@ -2,7 +2,8 @@
 name = "anchor-cli"
 version = "0.22.1"
 authors = ["armaniferrante <armaniferrante@gmail.com>"]
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [[bin]]
 name = "anchor"

+ 2 - 1
client/Cargo.toml

@@ -2,7 +2,8 @@
 name = "anchor-client"
 version = "0.22.1"
 authors = ["Serum Foundation <foundation@projectserum.com>"]
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 license = "Apache-2.0"
 description = "Rust client for Anchor programs"
 

+ 2 - 1
client/example/Cargo.toml

@@ -2,7 +2,8 @@
 name = "example"
 version = "0.1.0"
 authors = ["Armani Ferrante <armaniferrante@gmail.com>"]
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [workspace]
 

+ 2 - 1
examples/tutorial/basic-0/programs/basic-0/Cargo.toml

@@ -2,7 +2,8 @@
 name = "basic-0"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
examples/tutorial/basic-1/programs/basic-1/Cargo.toml

@@ -2,7 +2,8 @@
 name = "basic-1"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
examples/tutorial/basic-2/programs/basic-2/Cargo.toml

@@ -2,7 +2,8 @@
 name = "basic-2"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
examples/tutorial/basic-3/programs/puppet-master/Cargo.toml

@@ -2,7 +2,8 @@
 name = "puppet-master"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
examples/tutorial/basic-3/programs/puppet/Cargo.toml

@@ -2,7 +2,8 @@
 name = "puppet"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
examples/tutorial/basic-4/programs/basic-4/Cargo.toml

@@ -2,7 +2,8 @@
 name = "basic-4"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
lang/Cargo.toml

@@ -3,7 +3,8 @@ name = "anchor-lang"
 version = "0.22.1"
 authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 license = "Apache-2.0"
 description = "Solana Sealevel eDSL"
 

+ 2 - 1
lang/attribute/access-control/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for instruction access control"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/account/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for defining an account"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/constant/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for creating constant types"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/error/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for creating error types"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/event/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for defining an event"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/interface/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Attribute for defining a program interface trait"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/program/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor attribute macro for defining a program"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/attribute/state/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Attribute for defining a program state struct"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/derive/accounts/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor Derive macro for accounts"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 proc-macro = true

+ 2 - 1
lang/syn/Cargo.toml

@@ -5,7 +5,8 @@ authors = ["Serum Foundation <foundation@projectserum.com>"]
 repository = "https://github.com/project-serum/anchor"
 license = "Apache-2.0"
 description = "Anchor syntax parsing and code generation tools"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [features]
 init-if-needed = []

+ 3 - 3
lang/syn/src/codegen/accounts/__cpi_client_accounts.rs

@@ -159,12 +159,12 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
             #(#re_exports)*
 
             #struct_doc
-            pub struct #name#generics {
+            pub struct #name #generics {
                 #(#account_struct_fields),*
             }
 
             #[automatically_derived]
-            impl#generics anchor_lang::ToAccountMetas for #name#generics {
+            impl #generics anchor_lang::ToAccountMetas for #name #generics {
                 fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<anchor_lang::solana_program::instruction::AccountMeta> {
                     let mut account_metas = vec![];
                     #(#account_struct_metas)*
@@ -173,7 +173,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
             }
 
             #[automatically_derived]
-            impl<'info> anchor_lang::ToAccountInfos<'info> for #name#generics {
+            impl<'info> anchor_lang::ToAccountInfos<'info> for #name #generics {
                 fn to_account_infos(&self) -> Vec<anchor_lang::solana_program::account_info::AccountInfo<'info>> {
                     let mut account_infos = vec![];
                     #(#account_struct_infos)*

+ 1 - 1
lang/syn/src/codegen/accounts/to_account_metas.rs

@@ -29,7 +29,7 @@ pub fn generate(accs: &AccountsStruct) -> proc_macro2::TokenStream {
 
     quote! {
         #[automatically_derived]
-        impl#impl_gen anchor_lang::ToAccountMetas for #name #ty_gen #where_clause{
+        impl #impl_gen anchor_lang::ToAccountMetas for #name #ty_gen #where_clause{
             fn to_account_metas(&self, is_signer: Option<bool>) -> Vec<anchor_lang::solana_program::instruction::AccountMeta> {
                 let mut account_metas = vec![];
 

+ 2 - 1
spl/Cargo.toml

@@ -2,7 +2,8 @@
 name = "anchor-spl"
 version = "0.22.1"
 authors = ["Serum Foundation <foundation@projectserum.com>"]
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 license = "Apache-2.0"
 description = "CPI clients for SPL programs"
 

+ 2 - 1
tests/bpf-upgradeable-state/programs/bpf-upgradeable-state/Cargo.toml

@@ -2,7 +2,8 @@
 name = "bpf-upgradeable-state"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/cashiers-check/programs/cashiers-check/Cargo.toml

@@ -2,7 +2,8 @@
 name = "cashiers-check"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/cfo/programs/cfo/Cargo.toml

@@ -2,7 +2,8 @@
 name = "cfo"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/chat/programs/chat/Cargo.toml

@@ -2,7 +2,8 @@
 name = "chat"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/composite/programs/composite/Cargo.toml

@@ -2,7 +2,8 @@
 name = "composite"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/custom-coder/programs/custom-coder/Cargo.toml

@@ -2,7 +2,8 @@
 name = "custom-coder"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/custom-coder/programs/spl-token/Cargo.toml

@@ -2,7 +2,8 @@
 name = "spl-token"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/errors/programs/errors/Cargo.toml

@@ -2,7 +2,8 @@
 name = "errors"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/escrow/programs/escrow/Cargo.toml

@@ -2,7 +2,8 @@
 name = "escrow"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/events/programs/events/Cargo.toml

@@ -2,7 +2,8 @@
 name = "events"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/ido-pool/programs/ido-pool/Cargo.toml

@@ -2,7 +2,8 @@
 name = "ido-pool"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/interface/programs/counter-auth/Cargo.toml

@@ -2,7 +2,8 @@
 name = "counter-auth"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/interface/programs/counter/Cargo.toml

@@ -2,7 +2,8 @@
 name = "counter"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/lockup/programs/lockup/Cargo.toml

@@ -2,7 +2,8 @@
 name = "lockup"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/lockup/programs/registry/Cargo.toml

@@ -2,7 +2,8 @@
 name = "registry"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/misc/programs/misc/Cargo.toml

@@ -2,7 +2,8 @@
 name = "misc"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/misc/programs/misc2/Cargo.toml

@@ -2,7 +2,8 @@
 name = "misc2"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/misc/programs/shared/Cargo.toml

@@ -1,7 +1,8 @@
 [package]
 name = "shared"
 version = "0.1.0"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 

+ 2 - 1
tests/multisig/programs/multisig/Cargo.toml

@@ -2,7 +2,8 @@
 name = "multisig"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/pda-derivation/programs/pda-derivation/Cargo.toml

@@ -2,7 +2,8 @@
 name = "pda-derivation"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/pyth/programs/pyth/Cargo.toml

@@ -2,7 +2,8 @@
 name = "pyth"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/spl/token-proxy/programs/token-proxy/Cargo.toml

@@ -2,7 +2,8 @@
 name = "token-proxy"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/swap/programs/swap/Cargo.toml

@@ -2,7 +2,8 @@
 name = "swap"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/system-accounts/programs/system-accounts/Cargo.toml

@@ -2,7 +2,8 @@
 name = "system-accounts"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/sysvars/programs/sysvars/Cargo.toml

@@ -2,7 +2,8 @@
 name = "sysvars"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/tictactoe/programs/tictactoe/Cargo.toml

@@ -2,7 +2,8 @@
 name = "tictactoe"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/typescript/programs/shared/Cargo.toml

@@ -1,7 +1,8 @@
 [package]
 name = "shared"
 version = "0.1.0"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 

+ 2 - 1
tests/typescript/programs/typescript/Cargo.toml

@@ -2,7 +2,8 @@
 name = "typescript"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/zero-copy/programs/shared/Cargo.toml

@@ -1,7 +1,8 @@
 [package]
 name = "shared"
 version = "0.1.0"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 

+ 2 - 1
tests/zero-copy/programs/zero-copy/Cargo.toml

@@ -2,7 +2,8 @@
 name = "zero-copy"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]

+ 2 - 1
tests/zero-copy/programs/zero-cpi/Cargo.toml

@@ -2,7 +2,8 @@
 name = "zero-cpi"
 version = "0.1.0"
 description = "Created with Anchor"
-edition = "2018"
+rust-version = "1.56"
+edition = "2021"
 
 [lib]
 crate-type = ["cdylib", "lib"]