Skip to content

Add @warn_unused_result to set() #1

@danieleggert

Description

@danieleggert
    @warn_unused_result
    func set(newPart: Part) -> Whole {
        return boundLensStorage.lens.set(newPart, boundLensStorage.instance)
    }

This would make

data.throughLens.name.set("Daniel")

result in a warning. Which is good, because the code should probably be something like

data = data.throughLens.name.set("Daniel")

or similar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions