Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit a124f36

Browse files
committed
Update families to rust 2021
Signed-off-by: Joseph Livesey <joseph.livesey@btp.works>
1 parent 280e9c0 commit a124f36

File tree

13 files changed

+22
-17
lines changed

13 files changed

+22
-17
lines changed

families/battleship/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
name = "battleship"
1717
version = "0.1.0"
1818
authors = ["Bitwise IO, Inc."]
19+
edition = '2021'
1920

2021
[[example]]
2122
name = "play"

families/battleship/src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
use crate::game::{Action, Game};
16+
use crate::transaction_builder::TransactionBuilder;
1517
use base64::{engine::general_purpose, Engine as _};
1618
use dirs::home_dir;
1719
use failure::Error;
18-
use game::{Action, Game};
1920
use reqwest::{Client, Url};
2021
use sawtooth_sdk::signing::secp256k1::Secp256k1PrivateKey;
2122
use sawtooth_sdk::signing::{create_context, PrivateKey, Signer};
@@ -26,7 +27,6 @@ use std::io::Read;
2627
use std::path::PathBuf;
2728
use std::thread::sleep;
2829
use std::time::Duration;
29-
use transaction_builder::TransactionBuilder;
3030

3131
#[allow(clippy::upper_case_acronyms)]
3232
#[derive(Deserialize, Debug)]

families/battleship/src/handler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use game;
15+
use crate::game;
1616
use sawtooth_sdk::messages::processor::TpProcessRequest;
1717
use sawtooth_sdk::processor::handler::{ApplyError, TransactionContext, TransactionHandler};
1818
use serde_json;

families/block_info/sawtooth_block_info/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ version = "1.0.0"
2020
authors = ["Bitwise IO"]
2121
build = "build.rs"
2222
description = "The Sawtooth Block Info transaction processor"
23+
edition = '2021'
2324

2425
[package.metadata.deb]
2526
depends = "$auto"

families/block_info/sawtooth_block_info/src/handler.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
use std::time::{SystemTime, UNIX_EPOCH};
1919

20-
use addressing::NAMESPACE;
21-
use payload::BlockInfoPayload;
22-
use state::{BlockInfoState, Config, DEFAULT_SYNC_TOLERANCE, DEFAULT_TARGET_COUNT};
20+
use crate::addressing::NAMESPACE;
21+
use crate::payload::BlockInfoPayload;
22+
use crate::state::{BlockInfoState, Config, DEFAULT_SYNC_TOLERANCE, DEFAULT_TARGET_COUNT};
2323

2424
cfg_if! {
2525
if #[cfg(target_arch = "wasm32")] {

families/block_info/sawtooth_block_info/src/payload.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* ------------------------------------------------------------------------------
1616
*/
1717

18-
use state::BlockInfo;
18+
use crate::state::BlockInfo;
1919

2020
cfg_if! {
2121
if #[cfg(target_arch = "wasm32")] {
@@ -25,8 +25,8 @@ cfg_if! {
2525
}
2626
}
2727

28+
use crate::protos::block_info::BlockInfoTxn;
2829
use protobuf::Message;
29-
use protos::block_info::BlockInfoTxn;
3030

3131
fn validate_hex(string: &str, length: usize) -> bool {
3232
hex::decode(string).is_ok() && string.len() == length

families/block_info/sawtooth_block_info/src/state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* ------------------------------------------------------------------------------
1616
*/
1717

18-
use addressing::{create_block_address, get_config_addr};
18+
use crate::addressing::{create_block_address, get_config_addr};
19+
use crate::protos;
1920
use protobuf::Message;
20-
use protos;
2121

2222
pub const DEFAULT_SYNC_TOLERANCE: u64 = 60 * 5;
2323
pub const DEFAULT_TARGET_COUNT: u64 = 256;

families/identity/sawtooth_identity/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ version = "0.1.0"
2020
authors = ["Bitwise IO"]
2121
build = "build.rs"
2222
description = "The Sawtooth Identity TP for validating on-chain roles and identities."
23+
edition = '2021'
2324

2425
[[bin]]
2526
name = "identity-tp"

families/identity/sawtooth_identity/src/handler.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ cfg_if! {
3131
}
3232
}
3333

34+
use crate::protos::identities::{IdentityPayload, IdentityPayload_IdentityType};
35+
use crate::state::IdentityState;
3436
use crypto::digest::Digest;
3537
use crypto::sha2::Sha256;
3638
use protobuf::Message;
37-
use protos::identities::{IdentityPayload, IdentityPayload_IdentityType};
38-
use state::IdentityState;
3939
use std::iter::repeat;
4040

4141
#[cfg(target_arch = "wasm32")]

families/settings/sawtooth_settings/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ authors = ["Bitwise IO"]
1919
build = "build.rs"
2020
description = "The Sawtooth Settings transaction processor for validating on-chain settings."
2121
license = "Apache-2.0"
22+
edition = '2021'
2223

2324
[package.metadata.deb]
2425
depends = "$auto"

0 commit comments

Comments
 (0)