Skip to content

Commit ae75e1b

Browse files
committed
type clean up
1 parent fa4727d commit ae75e1b

File tree

2 files changed

+6
-30
lines changed

2 files changed

+6
-30
lines changed

astro_modintegrator/src/lib.rs

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ use lazy_static::lazy_static;
55

66
use unreal_modloader::unreal_asset::ue4version::VER_UE4_23;
77
use unreal_modloader::unreal_modintegrator::{
8-
helpers::game_to_absolute, BakedInstructions, BakedMod, IntegratorConfig, IntegratorMod,
8+
helpers::game_to_absolute, BakedMod, HandlerFn, IntegratorConfig, IntegratorMod,
99
};
10-
use unreal_modloader::unreal_pak::PakFile;
1110

1211
pub mod assets;
1312
pub(crate) mod baked;
@@ -45,28 +44,9 @@ impl<'data> IntegratorConfig<'data, (), io::Error> for AstroIntegratorConfig {
4544
&()
4645
}
4746

48-
fn get_handlers(
49-
&self,
50-
) -> std::collections::HashMap<
51-
String,
52-
Box<
53-
dyn FnMut(
54-
&(),
55-
&mut PakFile,
56-
&mut Vec<PakFile>,
57-
&mut Vec<PakFile>,
58-
&Vec<serde_json::Value>,
59-
) -> Result<(), io::Error>,
60-
>,
61-
> {
62-
type HandlerFn = dyn FnMut(
63-
&(),
64-
&mut PakFile,
65-
&mut Vec<PakFile>,
66-
&mut Vec<PakFile>,
67-
&Vec<serde_json::Value>,
68-
) -> Result<(), io::Error>;
69-
let mut handlers: std::collections::HashMap<String, Box<HandlerFn>> = HashMap::new();
47+
fn get_handlers(&self) -> std::collections::HashMap<String, Box<HandlerFn<(), io::Error>>> {
48+
let mut handlers: std::collections::HashMap<String, Box<HandlerFn<(), io::Error>>> =
49+
HashMap::new();
7050

7151
handlers.insert(
7252
String::from("mission_trailheads"),
@@ -91,10 +71,6 @@ impl<'data> IntegratorConfig<'data, (), io::Error> for AstroIntegratorConfig {
9171
handlers
9272
}
9373

94-
fn get_instructions(&self) -> Option<BakedInstructions> {
95-
None
96-
}
97-
9874
fn get_baked_mods(&self) -> Vec<IntegratorMod<io::Error>> {
9975
Vec::from([BakedMod {
10076
data: baked::CORE_MOD,

astro_modloader/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ impl AstroGameConfig {
125125
}
126126
}
127127

128-
impl<T, E: std::error::Error + 'static> GameConfig<'static, AstroIntegratorConfig, T, E>
128+
impl<D, E: std::error::Error + 'static> GameConfig<'static, AstroIntegratorConfig, D, E>
129129
for AstroGameConfig
130130
where
131-
AstroIntegratorConfig: IntegratorConfig<'static, T, E>,
131+
AstroIntegratorConfig: IntegratorConfig<'static, D, E>,
132132
{
133133
fn get_integrator_config(&self) -> &AstroIntegratorConfig {
134134
&AstroIntegratorConfig

0 commit comments

Comments
 (0)