Repository: tomekpiotrowski/lets_expect (rust)

Issue:
`u128` type is not supported by the number humanizer

Pull request description:
Support `u128` type in the number humanizer
Fixes #59

Patch:
diff --git a/lets_expect_core/src/core/to_ident.rs b/lets_expect_core/src/core/to_ident.rs
index 6150d9c..57dbcc3 100644
--- a/lets_expect_core/src/core/to_ident.rs
+++ b/lets_expect_core/src/core/to_ident.rs
@@ -207,7 +207,13 @@ fn expr_lit_to_ident(lit: &syn::ExprLit) -> String {
         Lit::ByteStr(_) => todo!(),
         Lit::Byte(_) => todo!(),
         Lit::Char(_) => todo!(),
-        Lit::Int(value) => humanize(value.base10_parse::<i64>().unwrap()),
+        Lit::Int(value) => {
+            if let Ok(parsed) = value.base10_parse::<i64>() {
+                humanize(parsed)
+            } else {
+                "number_".to_string() + value.to_string().as_str()
+            }
+        }
         Lit::Float(value) => {
             let value: f64 = value.base10_parse().unwrap();
             let formatted = format!("{:.2}", value);


Test patch:
diff --git a/tests/let.rs b/tests/let.rs
index eef38c2..f02636b 100644
--- a/tests/let.rs
+++ b/tests/let.rs
@@ -35,6 +35,10 @@ mod tests {
             when(value = value * 3) {
                 to equal(30)
             }
+
+            when(value: u128 = 1267650600228229401496703205376) {
+                to equal(2535301200456458802993406410752)
+            }
         }
 
     }