summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi/lib.rs3
-rw-r--r--ext/net/ops.rs5
-rw-r--r--ext/webgpu/src/bundle.rs4
-rw-r--r--ext/webgpu/src/compute_pass.rs4
-rw-r--r--ext/webgpu/src/render_pass.rs4
5 files changed, 10 insertions, 10 deletions
diff --git a/ext/ffi/lib.rs b/ext/ffi/lib.rs
index ca02aca5b..17ebf772b 100644
--- a/ext/ffi/lib.rs
+++ b/ext/ffi/lib.rs
@@ -573,9 +573,8 @@ where
// By default, Err returned by this function does not tell
// which symbol wasn't exported. So we'll modify the error
// message to include the name of symbol.
- //
- // SAFETY: The obtained T symbol is the size of a pointer.
let fn_ptr =
+ // SAFETY: The obtained T symbol is the size of a pointer.
match unsafe { resource.lib.symbol::<*const c_void>(symbol) } {
Ok(value) => Ok(value),
Err(err) => Err(generic_error(format!(
diff --git a/ext/net/ops.rs b/ext/net/ops.rs
index 3522a919c..87bfc3272 100644
--- a/ext/net/ops.rs
+++ b/ext/net/ops.rs
@@ -754,13 +754,14 @@ fn rdata_to_return_record(
let mut s = String::new();
if let Some(name) = name {
- s.push_str(&format!("{}", name));
+ s.push_str(&name.to_string());
} else if name.is_none() && key_values.is_empty() {
s.push(';');
}
for key_value in key_values {
- s.push_str(&format!("; {}", key_value));
+ s.push_str("; ");
+ s.push_str(&key_value.to_string());
}
s
diff --git a/ext/webgpu/src/bundle.rs b/ext/webgpu/src/bundle.rs
index 0c1f82202..1f5e4da7b 100644
--- a/ext/webgpu/src/bundle.rs
+++ b/ext/webgpu/src/bundle.rs
@@ -152,9 +152,9 @@ pub fn op_webgpu_render_bundle_encoder_set_bind_group(
// Align the data
assert!(args.dynamic_offsets_data.len() % std::mem::size_of::<u32>() == 0);
- // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
- // multiple of 4.
let (prefix, dynamic_offsets_data, suffix) =
+ // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
+ // multiple of 4.
unsafe { args.dynamic_offsets_data.align_to::<u32>() };
assert!(prefix.is_empty());
assert!(suffix.is_empty());
diff --git a/ext/webgpu/src/compute_pass.rs b/ext/webgpu/src/compute_pass.rs
index 9f6394f7b..5e27583f4 100644
--- a/ext/webgpu/src/compute_pass.rs
+++ b/ext/webgpu/src/compute_pass.rs
@@ -241,9 +241,9 @@ pub fn op_webgpu_compute_pass_set_bind_group(
// Align the data
assert!(args.dynamic_offsets_data_start % std::mem::size_of::<u32>() == 0);
- // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
- // multiple of 4.
let (prefix, dynamic_offsets_data, suffix) =
+ // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
+ // multiple of 4.
unsafe { args.dynamic_offsets_data.align_to::<u32>() };
assert!(prefix.is_empty());
assert!(suffix.is_empty());
diff --git a/ext/webgpu/src/render_pass.rs b/ext/webgpu/src/render_pass.rs
index 16398359f..5d2cd6e5a 100644
--- a/ext/webgpu/src/render_pass.rs
+++ b/ext/webgpu/src/render_pass.rs
@@ -305,9 +305,9 @@ pub fn op_webgpu_render_pass_set_bind_group(
// Align the data
assert!(args.dynamic_offsets_data_start % std::mem::size_of::<u32>() == 0);
- // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
- // multiple of 4.
let (prefix, dynamic_offsets_data, suffix) =
+ // SAFETY: A u8 to u32 cast is safe because we asserted that the length is a
+ // multiple of 4.
unsafe { args.dynamic_offsets_data.align_to::<u32>() };
assert!(prefix.is_empty());
assert!(suffix.is_empty());