Skip to content

Commit

Permalink
Bump Rust version to 1.56.1, and use 2021 Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Dec 10, 2021
1 parent a788886 commit 615ea3c
Show file tree
Hide file tree
Showing 47 changed files with 79 additions and 79 deletions.
2 changes: 1 addition & 1 deletion associated-token-account/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Associated Token Account"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion binary-option/program/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "binary-option"
version = "0.1.0"
edition = "2018"
edition = "2021"
license = "WTFPL"

[features]
Expand Down
2 changes: 1 addition & 1 deletion binary-oracle-pair/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Binary Oracle Pair"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
test-bpf = []
Expand Down
4 changes: 2 additions & 2 deletions ci/rust-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
if [[ -n $RUST_STABLE_VERSION ]]; then
stable_version="$RUST_STABLE_VERSION"
else
stable_version=1.54.0
stable_version=1.56.1
fi

if [[ -n $RUST_NIGHTLY_VERSION ]]; then
nightly_version="$RUST_NIGHTLY_VERSION"
else
nightly_version=2021-08-02
nightly_version=2021-11-30
fi


Expand Down
2 changes: 1 addition & 1 deletion examples/rust/cross-program-invocation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Cross Program Invocation Example"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
publish = false

[features]
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/custom-heap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Custom Heap Example"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
publish = false

[features]
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Logging Example"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
publish = false

[features]
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/sysvar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Sysvar Example"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
publish = false

[features]
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/transfer-lamports/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Transfer Lamports Example"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion farms/farm-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
debug = []
Expand Down
2 changes: 1 addition & 1 deletion farms/farm-ctrl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
debug = []
Expand Down
2 changes: 1 addition & 1 deletion farms/farm-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
debug = []
Expand Down
2 changes: 1 addition & 1 deletion farms/farm-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
debug = []
Expand Down
2 changes: 1 addition & 1 deletion farms/router-main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion farms/router-orca/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion farms/router-raydium/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion farms/router-saber/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion farms/vaults/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion feature-proposal/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "SPL Feature Proposal Command-line Utility"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[dependencies]
chrono = "0.4.19"
Expand Down
2 changes: 1 addition & 1 deletion feature-proposal/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Feature Proposal Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion governance/chat/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Governance Chat Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion governance/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Governance Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion governance/test-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Governance Program Test SDK"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[dependencies]
arrayref = "0.3.6"
Expand Down
2 changes: 1 addition & 1 deletion governance/tools/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Governance Tools"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[dependencies]
arrayref = "0.3.6"
Expand Down
2 changes: 1 addition & 1 deletion governance/voter-weight-addin/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Governance Voter Weight Addin Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion libraries/math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Math"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion memo/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Memo"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion name-service/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [
"Solana Maintainers <maintainers@solana.foundation>"
]
license = "Apache-2.0"
edition = "2018"
edition = "2021"

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

Expand Down
2 changes: 1 addition & 1 deletion record/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Record Program"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion shared-memory/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Shared-memory"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
test-bpf = []
Expand Down
2 changes: 1 addition & 1 deletion stake-pool/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
description = "SPL-Stake-Pool Command-line Utility"
edition = "2018"
edition = "2021"
homepage = "https://spl.solana.com/stake-pool"
license = "Apache-2.0"
name = "spl-stake-pool-cli"
Expand Down
2 changes: 1 addition & 1 deletion stake-pool/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Stake Pool"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
4 changes: 2 additions & 2 deletions stake-pool/program/src/big_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ impl<'data> BigVec<'data> {
if self.data.len() < end_index {
return Err(ProgramError::AccountDataTooSmall);
}
let mut element_ref = &mut self.data[start_index..start_index + T::LEN];
element.pack_into_slice(&mut element_ref);
let element_ref = &mut self.data[start_index..start_index + T::LEN];
element.pack_into_slice(element_ref);
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion stateless-asks/program/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "stateless-asks"
version = "0.1.0"
edition = "2018"
edition = "2021"

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

Expand Down
2 changes: 1 addition & 1 deletion token-lending/cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
description = "SPL Token Lending CLI"
edition = "2018"
edition = "2021"
homepage = "https://spl.solana.com/token-lending"
license = "Apache-2.0"
name = "spl-token-lending-cli"
Expand Down
2 changes: 1 addition & 1 deletion token-lending/flash_loan_receiver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "flash_loan_receiver"
version = "1.0.0"
edition = "2018"
edition = "2021"

[dependencies]
arrayref = "0.3.6"
Expand Down
2 changes: 1 addition & 1 deletion token-lending/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Token Lending"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion token-swap/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Token Swap"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"

[features]
no-entrypoint = []
Expand Down
2 changes: 1 addition & 1 deletion token-swap/program/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "Solana Program Library Token Swap Fuzzer"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2018"
edition = "2021"
publish = false

[dependencies]
Expand Down
Loading

0 comments on commit 615ea3c

Please sign in to comment.