File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,12 @@ pub struct WasmFlags {
137
137
138
138
#[ wasm_bindgen]
139
139
impl WasmFlags {
140
- // this attribute should be at the item level at `to_js`, but it doesn't seem to work there.
140
+ // these attributes should be at the item level, but they don't seem to work there.
141
+ #![ expect(
142
+ clippy:: wrong_self_convention,
143
+ clippy:: trivially_copy_pass_by_ref,
144
+ reason = "to_js taking `self` causes weird errors when wasm-fied"
145
+ ) ]
141
146
#![ expect(
142
147
clippy:: needless_pass_by_value,
143
148
reason = "wasm-bindgen does not support &[T]"
@@ -150,7 +155,7 @@ impl WasmFlags {
150
155
}
151
156
152
157
#[ wasm_bindgen]
153
- pub fn to_js ( self ) -> HQResult < JsValue > {
158
+ pub fn to_js ( & self ) -> HQResult < JsValue > {
154
159
serde_wasm_bindgen:: to_value ( & self )
155
160
. map_err ( |_| make_hq_bug ! ( "couldn't convert WasmFlags to JsValue" ) )
156
161
}
You can’t perform that action at this time.
0 commit comments