From 8c789806f2b4370c3be969ddd5ccaa9e5d73ab21 Mon Sep 17 00:00:00 2001 From: Sergei Pepyakin <sergei@parity.io> Date: Fri, 17 Jan 2020 18:09:39 +0100 Subject: [PATCH] Drive by fix of doc of `Value`. (#4658) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Drive by fix of doc of `Value`. * Apply suggestions from code review Co-Authored-By: André Silva <andre.beat@gmail.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: André Silva <andre.beat@gmail.com> --- substrate/primitives/wasm-interface/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/substrate/primitives/wasm-interface/src/lib.rs b/substrate/primitives/wasm-interface/src/lib.rs index bc34bfda970..b0bbbf82db3 100644 --- a/substrate/primitives/wasm-interface/src/lib.rs +++ b/substrate/primitives/wasm-interface/src/lib.rs @@ -39,13 +39,17 @@ pub enum ValueType { /// Values supported by Substrate on the boundary between host/Wasm. #[derive(PartialEq, Debug, Clone, Copy)] pub enum Value { - /// An `i32` value. + /// A 32-bit integer. I32(i32), - /// An `i64` value. + /// A 64-bit integer. I64(i64), - /// An nan-preserving `f32` value. + /// A 32-bit floating-point number stored as raw bit pattern. + /// + /// You can materialize this value using `f32::from_bits`. F32(u32), - /// An nan-preserving `f64` value. + /// A 64-bit floating-point number stored as raw bit pattern. + /// + /// You can materialize this value using `f64::from_bits`. F64(u64), } -- GitLab