Skip to content

Commit

Permalink
Use BTreeSet (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
juchiast authored Nov 8, 2023
1 parent 2617d33 commit f805b6b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const DEFINITION: &str =
flow_lib::node_definition!("solana/NFT/candy_machine/add_config_lines.json");

fn build() -> BuildResult {
use once_cell::sync::Lazy;
static CACHE: BuilderCache = BuilderCache::new(|| {
CmdBuilder::new(DEFINITION)?
.check_name(ADD_CONFIG_LINES)?
Expand Down
1 change: 0 additions & 1 deletion crates/cmds-solana/src/nft/candy_machine_v3/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const INITIALIZE_CANDY_MACHINE: &str = "initialize_candy_machine";
const DEFINITION: &str = flow_lib::node_definition!("solana/NFT/candy_machine/initialize.json");

fn build() -> BuildResult {
use once_cell::sync::Lazy;
static CACHE: BuilderCache = BuilderCache::new(|| {
CmdBuilder::new(DEFINITION)?
.check_name(INITIALIZE_CANDY_MACHINE)?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ use solana_sdk::pubkey::Pubkey;
// Command Name
const INITIALIZE_CANDY_GUARD: &str = "initialize_candy_guard";

const DEFINITION: &str = flow_lib::node_definition!("solana/NFT/candy_machine/initialize_candy_guard.json"
);
const DEFINITION: &str =
flow_lib::node_definition!("solana/NFT/candy_machine/initialize_candy_guard.json");

fn build() -> BuildResult {
use once_cell::sync::Lazy;
static CACHE: BuilderCache = BuilderCache::new(|| {
CmdBuilder::new(DEFINITION)?
.check_name(INITIALIZE_CANDY_GUARD)?
Expand Down
1 change: 0 additions & 1 deletion crates/cmds-solana/src/nft/candy_machine_v3/mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const MINT: &str = "mint";
const DEFINITION: &str = flow_lib::node_definition!("solana/NFT/candy_machine/mint.json");

fn build() -> BuildResult {
use once_cell::sync::Lazy;
static CACHE: BuilderCache = BuilderCache::new(|| {
CmdBuilder::new(DEFINITION)?
.check_name(MINT)?
Expand Down
4 changes: 1 addition & 3 deletions crates/cmds-solana/src/nft/candy_machine_v3/wrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ use solana_sdk::pubkey::Pubkey;
// Command Name
const WRAP: &str = "wrap";

const DEFINITION: &str =
flow_lib::node_definition!("solana/NFT/candy_machine/wrap.json");
const DEFINITION: &str = flow_lib::node_definition!("solana/NFT/candy_machine/wrap.json");

fn build() -> BuildResult {
use once_cell::sync::Lazy;
static CACHE: BuilderCache = BuilderCache::new(|| {
CmdBuilder::new(DEFINITION)?
.check_name(WRAP)?
Expand Down
2 changes: 1 addition & 1 deletion crates/cmds-std/src/storage/upload.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::supabase_error;
use flow_lib::command::prelude::*;
use bytes::Bytes;
use flow_lib::command::prelude::*;
use mime_guess::MimeGuess;
use reqwest::{
header::{AUTHORIZATION, CONTENT_TYPE},
Expand Down
5 changes: 2 additions & 3 deletions crates/flow-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ use flow_server::{
wss, Config,
};
use futures_util::{future::ok, TryFutureExt};
use hashbrown::HashSet;
use std::{borrow::Cow, convert::Infallible};
use std::{borrow::Cow, collections::BTreeSet, convert::Infallible};
use utils::address_book::AddressBook;

// avoid commands being optimized out by the compiler
Expand Down Expand Up @@ -89,7 +88,7 @@ async fn main() {
.get_admin_conn()
.and_then(move |conn| async move {
let names = conn.get_natives_commands().await?;
let mut missing = HashSet::new();
let mut missing = BTreeSet::new();
for name in names {
if !natives.contains(&&Cow::Borrowed(name.as_str())) {
missing.insert(name);
Expand Down

0 comments on commit f805b6b

Please sign in to comment.