Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > f1e2945305303df7a624fc14204302b8 > files > 1

rust-fasteval-0.2.4-1.mga10.src.rpm

From a355a80d78f29fe5cf8649f1e62916093af04bb7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Tue, 2 Nov 2021 12:55:34 +0100
Subject: [PATCH] Rust can parse Very Long nine tails since 1.55.0

Beholden most likely to
https://github.com/rust-lang/rust/commit/8752b403695a8830913571f0fd5ebfcf1483db37

Closes #16
---
 tests/from_go.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/from_go.rs b/tests/from_go.rs
index 0c160fc7c0..d6244c8912 100644
--- a/tests/from_go.rs
+++ b/tests/from_go.rs
@@ -61,9 +61,9 @@ fn aaa_test_b0() {
     ok_parse("3.14 + 4.99999999999999999999999999999999999999999999999999999", &mut slab);
     assert_eq!(format!("{:?}",&slab),
 "Slab{ exprs:{ 0:Expression { first: EConstant(3.14), pairs: [ExprPair(EAdd, EConstant(5.0))] } }, vals:{}, instrs:{} }");
-    // Go can parse this, but not Rust:
-    assert_eq!(parse_raw("3.14 + 4.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", &mut slab),
-Err(Error::ParseF64("4.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999".to_string())));
+    ok_parse("3.14 + 4.999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999", &mut slab);
+    assert_eq!(format!("{:?}",&slab),
+"Slab{ exprs:{ 0:Expression { first: EConstant(3.14), pairs: [ExprPair(EAdd, EConstant(5.0))] } }, vals:{}, instrs:{} }");
     ok_parse("3.14 + 0.9999", &mut slab);
     assert_eq!(format!("{:?}",&slab),
 "Slab{ exprs:{ 0:Expression { first: EConstant(3.14), pairs: [ExprPair(EAdd, EConstant(0.9999))] } }, vals:{}, instrs:{} }");