Skip to content

Commit 159267b

Browse files
committed
update
1 parent 637942a commit 159267b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gateway/spacegate-lib/src/plugin/auth.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use spacegate_shell::{
1919
extension::Reflect,
2020
helper_layers::bidirection_filter::{Bdf, BdfLayer, BoxReqFut, BoxRespFut},
2121
},
22-
plugin::{ MakeSgLayer, Plugin, PluginError},
22+
plugin::{MakeSgLayer, Plugin, PluginError},
2323
BoxError, SgBody, SgBoxLayer,
2424
};
2525
use std::{
@@ -534,7 +534,7 @@ impl Plugin for AuthPlugin {
534534
while !tardis_init.is_completed() {
535535
// blocking wait tardis setup
536536
}
537-
Ok(spacegate_shell::plugin::instance::PluginInstance::new::<Self, _>(config, || filter.make_layer()))
537+
Ok(spacegate_shell::plugin::instance::PluginInstance::new::<Self, _>(config, move || filter.make_layer()))
538538
}
539539
// fn create(_: Option<String>, value: JsonValue) -> Result<Self::MakeLayer, BoxError> {
540540
// }

gateway/spacegate-lib/src/plugin/ip_time.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub struct SgIpTimePlugin;
120120
impl Plugin for SgIpTimePlugin {
121121
const CODE: &'static str = CODE;
122122
fn create(config: spacegate_shell::plugin::PluginConfig) -> Result<spacegate_shell::plugin::instance::PluginInstance, BoxError> {
123-
let ip_time_config: SgFilterIpTimeConfig = serde_json::from_value(config.spec)?;
123+
let ip_time_config: SgFilterIpTimeConfig = serde_json::from_value(config.spec.clone())?;
124124
let filter: SgFilterIpTime = ip_time_config.into();
125125
let instance = spacegate_shell::plugin::instance::PluginInstance::new::<Self, _>(config, move || filter.make_layer());
126126
Ok(instance)

0 commit comments

Comments
 (0)