Skip to content

Commit

Permalink
remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
germ3n committed Jan 20, 2025
1 parent ca7197c commit c014696
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 18 deletions.
9 changes: 2 additions & 7 deletions tig-native-wrapper/src/dylib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
libloading::{Library, Symbol},
libloading::{Library},
std::path::Path,
std::panic,
};
Expand All @@ -14,9 +14,4 @@ pub fn load_module(path: &Path) -> Result<Library, String>
Ok(lib_result) => lib_result.map_err(|e| e.to_string()),
Err(_) => Err("Failed to load module".to_string())
}
}

pub fn get_symbol<'lib, T>(lib: &'lib Library, name: &[u8]) -> Result<Symbol<'lib, T>, String>
{
unsafe { lib.get(name).map_err(|e| e.to_string()) }
}
}
10 changes: 4 additions & 6 deletions tig-native-wrapper/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ mod dylib;
mod solvers;

use {
std::path::Path,
tig_challenges::{
knapsack::{Challenge as KnapsackChallenge, Difficulty as KnapsackDifficulty},
satisfiability::{Challenge as SatisfiabilityChallenge, Difficulty as SatisfiabilityDifficulty},
vector_search::{Challenge as VectorSearchChallenge, Difficulty as VectorSearchDifficulty},
vehicle_routing::{Challenge as VehicleRoutingChallenge, Difficulty as VehicleRoutingDifficulty},
ChallengeTrait
knapsack::{Challenge as KnapsackChallenge},
satisfiability::{Challenge as SatisfiabilityChallenge},
vector_search::{Challenge as VectorSearchChallenge},
vehicle_routing::{Challenge as VehicleRoutingChallenge},
},
};

Expand Down
1 change: 0 additions & 1 deletion tig-native-wrapper/src/solvers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use {
satisfiability::{Challenge as SatisfiabilityChallenge, Solution as SatisfiabilitySolution},
vector_search::{Challenge as VectorSearchChallenge, Solution as VectorSearchSolution},
vehicle_routing::{Challenge as VehicleRoutingChallenge, Solution as VehicleRoutingSolution},
ChallengeTrait
},
crate::dylib::{load_module}
};
Expand Down
8 changes: 4 additions & 4 deletions tig-worker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ use tig_structs::core::*;
use tig_utils::{compress_obj, dejsonify, jsonify, MerkleHash, MerkleTree};
use tig_worker::OutputData;
use tokio::runtime::Runtime;
use tig_challenges::knapsack::{Challenge as KnapsackChallenge, Solution as KnapsackSolution};
use tig_challenges::satisfiability::{Challenge as SatisfiabilityChallenge, Solution as SatisfiabilitySolution};
use tig_challenges::vehicle_routing::{Challenge as VehicleRoutingChallenge, Solution as VehicleRoutingSolution};
use tig_challenges::vector_search::{Challenge as VectorSearchChallenge, Solution as VectorSearchSolution};
use tig_challenges::knapsack::{Challenge as KnapsackChallenge};
use tig_challenges::satisfiability::{Challenge as SatisfiabilityChallenge};
use tig_challenges::vehicle_routing::{Challenge as VehicleRoutingChallenge};
use tig_challenges::vector_search::{Challenge as VectorSearchChallenge};
use tig_challenges::ChallengeTrait;

fn cli() -> Command {
Expand Down

0 comments on commit c014696

Please sign in to comment.