Skip to content

Commit

Permalink
program: move itertools to dev-dependencies (#1782)
Browse files Browse the repository at this point in the history
* port join from itertools and use it in program_stubs.rs

* move itertools to dev-dependencies of solana-program

* add comment to join fn

* more concise replacement for join fn

Co-authored-by: Jon C <me@jonc.dev>

* remove join fn

---------

Co-authored-by: Jon C <me@jonc.dev>
  • Loading branch information
kevinheavey and joncinque committed Jun 19, 2024
1 parent 403b793 commit 2bdba73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 0 additions & 1 deletion programs/sbf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions sdk/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ borsh0-10 = { package = "borsh", version = "0.10.3", optional = true }
bs58 = { workspace = true }
bv = { workspace = true, features = ["serde"] }
bytemuck = { workspace = true, features = ["derive"] }
itertools = { workspace = true }
lazy_static = { workspace = true }
log = { workspace = true }
memoffset = { workspace = true }
Expand Down Expand Up @@ -53,7 +52,6 @@ ark-serialize = { workspace = true }
base64 = { workspace = true, features = ["alloc", "std"] }
bitflags = { workspace = true }
curve25519-dalek = { workspace = true }
itertools = { workspace = true }
libsecp256k1 = { workspace = true }
num-bigint = { workspace = true }
rand = { workspace = true }
Expand All @@ -77,6 +75,7 @@ parking_lot = { workspace = true }
anyhow = { workspace = true }
array-bytes = { workspace = true }
assert_matches = { workspace = true }
itertools = { workspace = true }
serde_json = { workspace = true }
static_assertions = { workspace = true }

Expand Down
7 changes: 5 additions & 2 deletions sdk/program/src/program_stubs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use {
program_error::UNSUPPORTED_SYSVAR, pubkey::Pubkey,
},
base64::{prelude::BASE64_STANDARD, Engine},
itertools::Itertools,
std::sync::{Arc, RwLock},
};

Expand Down Expand Up @@ -114,7 +113,11 @@ pub trait SyscallStubs: Sync + Send {
fn sol_log_data(&self, fields: &[&[u8]]) {
println!(
"data: {}",
fields.iter().map(|v| BASE64_STANDARD.encode(v)).join(" ")
fields
.iter()
.map(|v| BASE64_STANDARD.encode(v))
.collect::<Vec<_>>()
.join(" ")
);
}
fn sol_get_processed_sibling_instruction(&self, _index: usize) -> Option<Instruction> {
Expand Down

0 comments on commit 2bdba73

Please sign in to comment.