Skip to content

refactor(engine): generic FrameSink instead of Box<dyn FnMut> #329

@Kohei-Wada

Description

@Kohei-Wada

Where

  • `ttymap-engine/src/map/render/thread.rs:28`

What

`FrameSink = Box<dyn FnMut(MapFrame) -> bool + Send>` boxes a callback that's invoked once per frame on the render thread. Trivial perf cost; readability only.

Proposal

`RenderHandle::spawn<S: FnMut(MapFrame) -> bool + Send + 'static>`. The binary side loses an explicit `Box::new`. No measurable speed-up — purely a "is the boxing earning its keep?" call.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowNice to haverefactorCode refactoring without behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions