Skip to content

Redundent transmute in osmflat_generated #72

@hallahan

Description

@hallahan

Often times there are accessors that transmute the same time into itself such as:

pub fn id(&self) -> i64 {
let value = flatdata_read_bytes!(i64, self.data.as_ptr(), 0, 40);
unsafe { std::mem::transmute::<i64, i64>(value) }
}

Is there any reason why this is being done, or is it something odd with the code generator? In this instance, the id is already an i64. Why transmute?

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