Refactor indexing_error to encompass repetitive uses #144

Open
opened 2026-05-30 06:44:50 +00:00 by Vectornaut · 0 comments
Member

The indexing_error function in assembly.rs is only ever used in the following way, where element is an Element.

element.column_index().expect(
    indexing_error(
        /* item */,
        &element.id.get_clone_untracked(),
        /* actor */
    ).as_str()
)

We should therefore be able to profitably refactor it into a method of Element.

The `indexing_error` function in `assembly.rs` is only ever used in the following way, where `element` is an `Element`. ```rust element.column_index().expect( indexing_error( /* item */, &element.id.get_clone_untracked(), /* actor */ ).as_str() ) ``` We should therefore be able to profitably refactor it into a method of `Element`.
Sign in to join this conversation.
No description provided.