Skip to content

Remove all warnings when running make build-wasm #1193

@dannywillems

Description

@dannywillems

When running make build-wasm, we are getting many warnings.

warning: lifetime flowing from input to output with different syntax can be confusing
   --> ledger/src/scan_state/scan_state.rs:712:21
    |
712 |         pub fn iter(&self) -> OneOrTwoIter<T> {
    |                     ^^^^^     --------------- the lifetime gets resolved as `'_`
    |                     |
    |                     this lifetime flows to the output
    |
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
    |
712 |         pub fn iter(&self) -> OneOrTwoIter<'_, T> {
    |                                            +++

warning: lifetime flowing from input to output with different syntax can be confusing
    --> ledger/src/scan_state/transaction_logic.rs:2297:24
     |
2297 |         pub fn to_full(&self) -> MyCow<Account> {
     |                        ^^^^^     -------------- the lifetime gets resolved as `'_`
     |                        |
     |                        this lifetime flows to the output
     |
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
     |
2297 |         pub fn to_full(&self) -> MyCow<'_, Account> {
     |                                        +++

warning: lifetime flowing from input to output with different syntax can be confusing
   --> ledger/src/zkapps/intefaces.rs:462:14
    |
462 |     fn zkapp(&self) -> MyCow<ZkAppAccount>;
    |              ^^^^^     ------------------- the lifetime gets resolved as `'_`
    |              |
    |              this lifetime flows to the output
    |
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths
    |
462 |     fn zkapp(&self) -> MyCow<'_, ZkAppAccount>;
    |                              +++

warning: lifetime flowing from input to output with different syntax can be confusing
   --> ledger/src/zkapps/non_snark.rs:667:14
    |
667 |     fn zkapp(&self) -> MyCow<ZkAppAccount> {
    |              ^^^^^     ------------------- the lifetime gets resolved as `'_`
    |              |
    |              this lifetime flows to the output
    |
help: one option is to remove the lifetime for references and use the anonymous lifetime for paths

Here is a first automated attempt with Claude: https://github.com/o1-labs/openmina/pull/1171.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions