Rellum Rellum

S0016: len expects an array

Generated from rellum-diagnostics/src/db.rs.

Explanation

The len built-in reports the element count of an array value. Scalars, records, enums, tuples, and function values do not carry the runtime array header that len reads, so they cannot be passed to len.

Common causes

Canonical fixes

Before:

count = len(item)

After:

count = len([item])

Code example

count = len(item)