Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.54 #122

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cosmos-sdk-proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.54.0 # MSRV
- stable
target:
- x86_64-unknown-linux-gnu
Expand All @@ -42,7 +42,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.54.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cosmos-sdk-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.54.0 # MSRV
- stable
target:
- x86_64-unknown-linux-gnu
Expand All @@ -43,7 +43,7 @@ jobs:
strategy:
matrix:
rust:
- 1.51.0 # MSRV
- 1.54.0 # MSRV
- stable
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-protos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.54.0 # MSRV
components: rustfmt
override: true
profile: minimal
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.54.0 # MSRV
components: rustfmt
override: true
profile: minimal
Expand All @@ -35,7 +35,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0 # MSRV
toolchain: 1.54.0 # MSRV
components: clippy
override: true
profile: minimal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ all other crates, simply make the required edits in [main.rs](proto-build/main.r

## Minimum Supported Rust Version

Rust **1.48**
Rust **1.54**

[//]: # "crates"

Expand Down
4 changes: 2 additions & 2 deletions cosmos-sdk-proto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Pull requests to expand coverage are welcome.

## Minimum Supported Rust Version

Requires Rust **1.48** or newer.
This crate is supported on Rust **1.54** or newer.

[//]: # "badges"
[crate-image]: https://img.shields.io/crates/v/cosmos-sdk-proto.svg?logo=rust
Expand All @@ -31,7 +31,7 @@ Requires Rust **1.48** or newer.
[build-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmos-sdk-proto.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
[license-link]: https://github.com/cosmos/cosmos-rust/blob/master/LICENSE
[rustc-image]: https://img.shields.io/badge/rustc-1.48+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.54+-blue.svg

[//]: # "general links"
[Protobufs]: (https://github.com/cosmos/cosmos-sdk/tree/master/proto/)
Expand Down
4 changes: 2 additions & 2 deletions cosmos-sdk-rs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ of the [Cosmos SDK for Golang].

## Minimum Supported Rust Version

Requires Rust **1.48** or newer.
This crate is supported on Rust **1.54** or newer.

[//]: # "badges"
[crate-image]: https://img.shields.io/crates/v/cosmos_sdk.svg?logo=rust
Expand All @@ -24,7 +24,7 @@ Requires Rust **1.48** or newer.
[build-link]: https://github.com/cosmos/cosmos-rust/actions/workflows/cosmos-sdk-rs.yml
[license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg
[license-link]: https://github.com/cosmos/cosmos-rust/blob/master/LICENSE
[rustc-image]: https://img.shields.io/badge/rustc-1.48+-blue.svg
[rustc-image]: https://img.shields.io/badge/rustc-1.54+-blue.svg

[//]: # "general links"
[Cosmos]: https://cosmos.network/
Expand Down
33 changes: 15 additions & 18 deletions cosmos-sdk-rs/src/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,13 @@ impl From<MsgDelegate> for proto::cosmos::staking::v1beta1::MsgDelegate {

impl From<&MsgDelegate> for proto::cosmos::staking::v1beta1::MsgDelegate {
fn from(msg: &MsgDelegate) -> proto::cosmos::staking::v1beta1::MsgDelegate {
let proto_amount = if let Some(amount) = &msg.amount {
Some(proto::cosmos::base::v1beta1::Coin {
let proto_amount = msg
.amount
.as_ref()
.map(|amount| proto::cosmos::base::v1beta1::Coin {
denom: amount.denom.to_string(),
amount: amount.amount.to_string(),
})
} else {
None
};
});
proto::cosmos::staking::v1beta1::MsgDelegate {
delegator_address: msg.delegator_address.to_string(),
validator_address: msg.validator_address.to_string(),
Expand Down Expand Up @@ -143,14 +142,13 @@ impl From<MsgUndelegate> for proto::cosmos::staking::v1beta1::MsgUndelegate {

impl From<&MsgUndelegate> for proto::cosmos::staking::v1beta1::MsgUndelegate {
fn from(msg: &MsgUndelegate) -> proto::cosmos::staking::v1beta1::MsgUndelegate {
let proto_amount = if let Some(amount) = &msg.amount {
Some(proto::cosmos::base::v1beta1::Coin {
let proto_amount = msg
.amount
.as_ref()
.map(|amount| proto::cosmos::base::v1beta1::Coin {
denom: amount.denom.to_string(),
amount: amount.amount.to_string(),
})
} else {
None
};
});
proto::cosmos::staking::v1beta1::MsgUndelegate {
delegator_address: msg.delegator_address.to_string(),
validator_address: msg.validator_address.to_string(),
Expand Down Expand Up @@ -227,14 +225,13 @@ impl From<MsgBeginRedelegate> for proto::cosmos::staking::v1beta1::MsgBeginRedel

impl From<&MsgBeginRedelegate> for proto::cosmos::staking::v1beta1::MsgBeginRedelegate {
fn from(msg: &MsgBeginRedelegate) -> proto::cosmos::staking::v1beta1::MsgBeginRedelegate {
let proto_amount = if let Some(amount) = &msg.amount {
Some(proto::cosmos::base::v1beta1::Coin {
let proto_amount = msg
.amount
.as_ref()
.map(|amount| proto::cosmos::base::v1beta1::Coin {
denom: amount.denom.to_string(),
amount: amount.amount.to_string(),
})
} else {
None
};
});
proto::cosmos::staking::v1beta1::MsgBeginRedelegate {
delegator_address: msg.delegator_address.to_string(),
validator_src_address: msg.validator_src_address.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.51.0
1.54.0