Skip to content

clean up some transmutes #13007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

clean up some transmutes #13007

wants to merge 1 commit into from

Conversation

emberian
Copy link
Member

No description provided.

@@ -401,12 +401,10 @@ pub mod reader {
}

fn read_f64(&mut self) -> f64 {
let bits = doc_as_u64(self.next_doc(EsF64));
unsafe { transmute(bits) }
doc_as_u64(self.next_doc(EsF64)) as f64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't quite accurate because u64 as f64 is a floating-point-cast, whereas transmute is just a bit-cast

@emberian emberian closed this Mar 18, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Aug 16, 2022
Use Node 16 on CI and upgrade lockfile version

Code is on 16 too, there's hopefully no need to keep using the old version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants