Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit a12b6be

Browse files
committed
More merge conflicts
1 parent 557c720 commit a12b6be

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

crates/c-api/src/component/val.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ impl From<&Val> for wasmtime_component_val_t {
169169
Val::Result(_val) => todo!(),
170170
Val::Flags(_items) => todo!(),
171171
Val::Resource(_resource_any) => todo!(),
172+
Val::Future(_) => todo!(),
173+
Val::Stream(_) => todo!(),
174+
Val::ErrorContext(_) => todo!(),
172175
}
173176
}
174177
}

crates/test-programs/src/bin/async_error_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct Component;
1515

1616
impl Guest for Component {
1717
async fn run() {
18-
let err_ctx = ErrorContext::new("error".into());
18+
let err_ctx = ErrorContext::new("error");
1919
_ = err_ctx.debug_message();
2020
}
2121
}

crates/test-programs/src/bin/async_error_context_callee.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ struct Component;
1313

1414
impl bindings::exports::local::local::run_result::Guest for Component {
1515
async fn run_fail() -> Result<(), ErrorContext> {
16-
Err(ErrorContext::new("error".into()))
16+
Err(ErrorContext::new("error"))
1717
}
1818

1919
async fn run_pass() -> Result<(), ErrorContext> {

crates/wasi-http/tests/all/p3/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl Client for TestClient {
141141
if let Some(rejected_authority) = &self.rejected_authority {
142142
let authority = request.uri().authority().map(ToString::to_string).unwrap();
143143
if &authority == rejected_authority {
144-
return Ok(Err(ErrorCode::HttpRequestDenied.into()));
144+
return Ok(Err(ErrorCode::HttpRequestDenied));
145145
}
146146
}
147147
Ok(default_send_request(request, options).await)

crates/wasi/src/p3/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ where
182182
Some(Err(err)) => {
183183
// TODO: Close the stream with an error context
184184
drop(tx);
185-
break Err(err.into());
185+
break Err(err);
186186
}
187187
}
188188
};

crates/wasmtime/src/runtime/component/concurrent/futures_and_streams.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,7 @@ fn accept_reader<T: func::Lower + Send + 'static, B: WriteBuffer<T>, U: 'static>
218218
let mut store = token.as_context_mut(store);
219219
let ptr = instance as *mut _;
220220
let types = instance.component_types().clone();
221-
let count = buffer
222-
.remaining()
223-
.len()
224-
.min(usize::try_from(count).unwrap());
221+
let count = buffer.remaining().len().min(count);
225222

226223
store.with_attached_instance(instance, |mut store, _| {
227224
// SAFETY: `ptr` is derived from `interface` and thus known
@@ -2528,8 +2525,8 @@ impl ComponentInstance {
25282525
ty,
25292526
flat_abi,
25302527
options,
2531-
address: usize::try_from(address).unwrap(),
2532-
count: usize::try_from(count).unwrap(),
2528+
address,
2529+
count,
25332530
handle,
25342531
post_write: PostWrite::Continue,
25352532
};
@@ -2735,7 +2732,7 @@ impl ComponentInstance {
27352732
ty,
27362733
flat_abi,
27372734
options,
2738-
address: usize::try_from(address).unwrap(),
2735+
address,
27392736
count: usize::try_from(count).unwrap(),
27402737
handle,
27412738
};
@@ -2849,7 +2846,7 @@ impl ComponentInstance {
28492846
Reader::Guest {
28502847
options: &options,
28512848
ty,
2852-
address: usize::try_from(address).unwrap(),
2849+
address,
28532850
count: count.try_into().unwrap(),
28542851
},
28552852
)?;

0 commit comments

Comments
 (0)