Skip to content

Commit 8b42f39

Browse files
committed
Fix more test compiles
Signed-off-by: Alex Crichton <[email protected]>
1 parent 195be16 commit 8b42f39

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

crates/componentize/src/abi_conformance/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ use wasmtime::{
3636
component::{Component, InstancePre, Linker},
3737
Engine, Store,
3838
};
39-
use wasmtime_wasi::{pipe::MemoryOutputPipe, ResourceTable, WasiCtx, WasiCtxBuilder, WasiView};
39+
use wasmtime_wasi::{
40+
pipe::MemoryOutputPipe, IoView, ResourceTable, WasiCtx, WasiCtxBuilder, WasiView,
41+
};
4042

4143
pub use test_key_value::KeyValueReport;
4244
pub use test_llm::LlmReport;
@@ -261,11 +263,13 @@ impl Context {
261263
}
262264
}
263265

264-
impl WasiView for Context {
266+
impl IoView for Context {
265267
fn table(&mut self) -> &mut ResourceTable {
266268
&mut self.table
267269
}
270+
}
268271

272+
impl WasiView for Context {
269273
fn ctx(&mut self) -> &mut WasiCtx {
270274
&mut self.wasi
271275
}

crates/componentize/src/lib.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ mod tests {
267267
component::{Component, Linker},
268268
Config, Engine, Store,
269269
},
270-
wasmtime_wasi::{bindings::Command, pipe::MemoryInputPipe, ResourceTable, WasiView},
270+
wasmtime_wasi::{
271+
bindings::Command, pipe::MemoryInputPipe, IoView, ResourceTable, WasiView,
272+
},
271273
wasmtime_wasi::{WasiCtx, WasiCtxBuilder},
272274
};
273275

@@ -357,11 +359,12 @@ mod tests {
357359
ctx: WasiCtx,
358360
table: ResourceTable,
359361
}
360-
impl WasiView for Wasi {
362+
impl IoView for Wasi {
361363
fn table(&mut self) -> &mut ResourceTable {
362364
&mut self.table
363365
}
364-
366+
}
367+
impl WasiView for Wasi {
365368
fn ctx(&mut self) -> &mut WasiCtx {
366369
&mut self.ctx
367370
}

crates/factor-outbound-http/tests/factor_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use spin_factor_outbound_networking::OutboundNetworkingFactor;
77
use spin_factor_variables::VariablesFactor;
88
use spin_factors::{anyhow, RuntimeFactors};
99
use spin_factors_test::{toml, TestEnvironment};
10-
use wasmtime_wasi::Subscribe;
10+
use wasmtime_wasi::Pollable;
1111
use wasmtime_wasi_http::{
1212
bindings::http::types::ErrorCode, types::OutgoingRequestConfig, WasiHttpView,
1313
};

crates/factor-outbound-networking/tests/factor_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use spin_factor_variables::VariablesFactor;
33
use spin_factor_wasi::{DummyFilesMounter, WasiFactor};
44
use spin_factors::{anyhow, RuntimeFactors};
55
use spin_factors_test::{toml, TestEnvironment};
6-
use wasmtime_wasi::{bindings::sockets::instance_network::Host, SocketAddrUse, WasiView};
6+
use wasmtime_wasi::{bindings::sockets::instance_network::Host, IoView, SocketAddrUse};
77

88
#[derive(RuntimeFactors)]
99
struct TestFactors {

0 commit comments

Comments
 (0)