@@ -47,7 +47,8 @@ impl HostComponent for KeyValueComponent {
4747 linker : & mut spin_core:: Linker < T > ,
4848 get : impl Fn ( & mut spin_core:: Data < T > ) -> & mut Self :: Data + Send + Sync + Copy + ' static ,
4949 ) -> anyhow:: Result < ( ) > {
50- super :: key_value:: add_to_linker ( linker, get)
50+ super :: key_value:: add_to_linker ( linker, get) ?;
51+ spin_world:: v1:: key_value:: add_to_linker ( linker, get)
5152 }
5253
5354 fn build_data ( & self ) -> Self :: Data {
@@ -102,36 +103,3 @@ impl DynamicHostComponent for KeyValueComponent {
102103 }
103104 }
104105}
105-
106- pub struct LegacyKeyValueComponent ( KeyValueComponent ) ;
107-
108- impl LegacyKeyValueComponent {
109- pub fn new ( new : KeyValueComponent ) -> Self {
110- Self ( new)
111- }
112- }
113-
114- impl HostComponent for LegacyKeyValueComponent {
115- type Data = KeyValueDispatch ;
116-
117- fn add_to_linker < T : Send > (
118- linker : & mut spin_core:: Linker < T > ,
119- get : impl Fn ( & mut spin_core:: Data < T > ) -> & mut Self :: Data + Send + Sync + Copy + ' static ,
120- ) -> anyhow:: Result < ( ) > {
121- spin_world:: v1:: key_value:: add_to_linker ( linker, get)
122- }
123-
124- fn build_data ( & self ) -> Self :: Data {
125- self . 0 . build_data ( )
126- }
127- }
128-
129- impl DynamicHostComponent for LegacyKeyValueComponent {
130- fn update_data ( & self , data : & mut Self :: Data , component : & AppComponent ) -> anyhow:: Result < ( ) > {
131- self . 0 . update_data ( data, component)
132- }
133-
134- fn validate_app ( & self , app : & spin_app:: App ) -> anyhow:: Result < ( ) > {
135- self . 0 . validate_app ( app)
136- }
137- }
0 commit comments