#[napi(constructor)] | ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.9k
- Forks
- 412
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 61
Description
error[E0107]: method takes 1 generic argument but 2 generic arguments were supplied
--> adapter/desktop-glue/src/js_account.rs:8:1
|
8 | #[napi(constructor)]
| ^^^^^^^^^^^^^^^^^^^^ expected 1 generic argument
9 | #[derive(Serialize, Deserialize, Default, Debug)]
10 | pub struct JsAccount {
| --------- help: remove this generic argument
|
note: method defined here, with 1 generic parameter: T
--> /Users/cddengcong/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.14.1/src/bindgen_runtime/callback_info.rs:121:10
|
121 | pub fn construct<T: ObjectFinalize + 'static>(
| ^^^^^^^^^ -
= note: this error originates in the attribute macro napi (in Nightly builds, run with -Z macro-backtrace for more info)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with adapter/desktop-glue/src/js_account.rs at the #[napi(constructor)] attribute, then inspect napi 2.14.1's bindgen_runtime/callback_info.rs around construct. Reproduce the build and trace the macro-generated call; done means the reported E0107 error no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100