Skip to content

fix(conversations): unnecessary String allocation in normalize_message_item #357

Description

@praxis-bot

handlers.rs:531 allocates a String on every call to
normalize_message_item for a type comparison:

map.get("type") != Some(&Value::String("message".to_owned()))

Fix:

map.get("type").and_then(Value::as_str) != Some("message")

Metadata

Metadata

Assignees

No one assigned

    Labels

    HUMAN REVIEWEDHas been reviewed by a human and considered a valid buggood first issueGood for newcomers

    Type

    Projects

    Status
    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions