mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-16 14:31:22 +00:00
Remove the Clamped
descriptor type
This is just a bit too general to work with and is pretty funky. Instead just tweak `Clamped<&[u8]>` to naturally generate a descriptor for `Ref(Slice(ClampedU8))`, requiring fewer gymnastics when interpreting descriptors.
This commit is contained in:
@ -204,7 +204,7 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
|
||||
i = i,
|
||||
val = val,
|
||||
));
|
||||
if arg.is_by_ref() || arg.is_clamped_by_ref() {
|
||||
if arg.is_by_ref() {
|
||||
if optional {
|
||||
bail!("optional slices aren't currently supported");
|
||||
}
|
||||
|
@ -165,7 +165,7 @@ impl<'a, 'b> Rust2Js<'a, 'b> {
|
||||
},
|
||||
));
|
||||
|
||||
if !arg.is_by_ref() && !arg.is_clamped_by_ref() {
|
||||
if !arg.is_by_ref() {
|
||||
self.prelude(&format!(
|
||||
"\
|
||||
{start}
|
||||
|
Reference in New Issue
Block a user