Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/serde_json/tests/regression/issue1004.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / serde_json / tests / regression / issue1004.rs` 12 lines ยท 362 bytes Raw Blame History 1 #![cfg(feature = "arbitrary_precision")] 2 3 #[test] 4 fn test() { 5 let float = 5.55f32; 6 let value = serde_json::to_value(float).unwrap(); 7 let json = serde_json::to_string(&value).unwrap(); 8 9 // If the f32 were cast to f64 by Value before serialization, then this 10 // would incorrectly serialize as 5.`550000190734863`. 11 assert_eq!(json, "5.55"); 12 }