Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 615ea3c

Browse files
committed
Bump Rust version to 1.56.1, and use 2021 Edition
1 parent a788886 commit 615ea3c

File tree

47 files changed

+79
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+79
-79
lines changed

associated-token-account/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Associated Token Account"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

binary-option/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "binary-option"
33
version = "0.1.0"
4-
edition = "2018"
4+
edition = "2021"
55
license = "WTFPL"
66

77
[features]

binary-oracle-pair/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Binary Oracle Pair"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
test-bpf = []

ci/rust-version.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
if [[ -n $RUST_STABLE_VERSION ]]; then
1919
stable_version="$RUST_STABLE_VERSION"
2020
else
21-
stable_version=1.54.0
21+
stable_version=1.56.1
2222
fi
2323

2424
if [[ -n $RUST_NIGHTLY_VERSION ]]; then
2525
nightly_version="$RUST_NIGHTLY_VERSION"
2626
else
27-
nightly_version=2021-08-02
27+
nightly_version=2021-11-30
2828
fi
2929

3030

examples/rust/cross-program-invocation/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Cross Program Invocation Example"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99
publish = false
1010

1111
[features]

examples/rust/custom-heap/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Custom Heap Example"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99
publish = false
1010

1111
[features]

examples/rust/logging/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Logging Example"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99
publish = false
1010

1111
[features]

examples/rust/sysvar/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Sysvar Example"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99
publish = false
1010

1111
[features]

examples/rust/transfer-lamports/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Transfer Lamports Example"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

farms/farm-client/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
debug = []

farms/farm-ctrl/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
debug = []

farms/farm-rpc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
debug = []

farms/farm-sdk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
debug = []

farms/router-main/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
no-entrypoint = []

farms/router-orca/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
no-entrypoint = []

farms/router-raydium/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
no-entrypoint = []

farms/router-saber/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
no-entrypoint = []

farms/vaults/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
88
homepage = "https://solana.com/"
9-
edition = "2018"
9+
edition = "2021"
1010

1111
[features]
1212
no-entrypoint = []

feature-proposal/cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "SPL Feature Proposal Command-line Utility"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[dependencies]
1111
chrono = "0.4.19"

feature-proposal/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Feature Proposal Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

governance/chat/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Governance Chat Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

governance/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Governance Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

governance/test-sdk/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Governance Program Test SDK"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[dependencies]
1111
arrayref = "0.3.6"

governance/tools/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Governance Tools"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[dependencies]
1111
arrayref = "0.3.6"

governance/voter-weight-addin/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Governance Voter Weight Addin Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

libraries/math/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Math"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

memo/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Memo"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

name-service/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88
"Solana Maintainers <[email protected]>"
99
]
1010
license = "Apache-2.0"
11-
edition = "2018"
11+
edition = "2021"
1212

1313
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1414

record/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Record Program"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

shared-memory/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Shared-memory"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
test-bpf = []

stake-pool/cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
authors = ["Solana Maintainers <[email protected]>"]
33
description = "SPL-Stake-Pool Command-line Utility"
4-
edition = "2018"
4+
edition = "2021"
55
homepage = "https://spl.solana.com/stake-pool"
66
license = "Apache-2.0"
77
name = "spl-stake-pool-cli"

stake-pool/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Stake Pool"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

stake-pool/program/src/big_vec.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ impl<'data> BigVec<'data> {
120120
if self.data.len() < end_index {
121121
return Err(ProgramError::AccountDataTooSmall);
122122
}
123-
let mut element_ref = &mut self.data[start_index..start_index + T::LEN];
124-
element.pack_into_slice(&mut element_ref);
123+
let element_ref = &mut self.data[start_index..start_index + T::LEN];
124+
element.pack_into_slice(element_ref);
125125
Ok(())
126126
}
127127

stateless-asks/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "stateless-asks"
33
version = "0.1.0"
4-
edition = "2018"
4+
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

token-lending/cli/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
authors = ["Solana Maintainers <[email protected]>"]
33
description = "SPL Token Lending CLI"
4-
edition = "2018"
4+
edition = "2021"
55
homepage = "https://spl.solana.com/token-lending"
66
license = "Apache-2.0"
77
name = "spl-token-lending-cli"

token-lending/flash_loan_receiver/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "flash_loan_receiver"
33
version = "1.0.0"
4-
edition = "2018"
4+
edition = "2021"
55

66
[dependencies]
77
arrayref = "0.3.6"

token-lending/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Token Lending"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

token-swap/program/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Token Swap"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99

1010
[features]
1111
no-entrypoint = []

token-swap/program/fuzz/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "Solana Program Library Token Swap Fuzzer"
55
authors = ["Solana Maintainers <[email protected]>"]
66
repository = "https://github.com/solana-labs/solana-program-library"
77
license = "Apache-2.0"
8-
edition = "2018"
8+
edition = "2021"
99
publish = false
1010

1111
[dependencies]

0 commit comments

Comments
 (0)