Skip to content

Commit

Permalink
Preparing release of 0.5.12
Browse files Browse the repository at this point in the history
  • Loading branch information
maoueh committed Nov 10, 2023
1 parent 57ca2ae commit f24b7c9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.12

Added back some lost binary operations on `BigInt` like `BigInt - BigInt` for example.

## 0.5.11

### Highlights
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [
]

[workspace.package]
version = "0.5.11"
version = "0.5.12"
description = "Substreams SDK - A streaming data engine for The Graph - by StreamingFast"
edition = "2018"
homepage = "https://substreams.streamingfast.io/"
Expand All @@ -17,7 +17,7 @@ categories = ["api-bindings", "external-ffi-bindings", "wasm"]
rust-version = "1.60"

[workspace.dependencies]
substreams-macro = { version = "0.5.11", path = "./substreams-macro" }
substreams-macro = { version = "0.5.12", path = "./substreams-macro" }

[profile.release]
lto = true
Expand Down
16 changes: 16 additions & 0 deletions substreams/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,6 +1007,10 @@ macro_rules! forward_val_val_binop_assign {

macro_rules! forward_artithmetic_binop {
(impl $impl:ident fn $method:ident) => {
forward_val_val_binop!(impl $impl for (BigInt, BigInt) fn $method);
forward_val_val_binop!(impl $impl for (ref &BigInt, BigInt) fn $method);
forward_val_val_binop!(impl $impl for (BigInt, ref &BigInt) fn $method);
forward_val_val_binop!(impl $impl for (ref &BigInt, ref &BigInt) fn $method);
forward_val_val_binop!(impl $impl for (BigInt, primitive i8; u8; i16; u16; u32; i32; u64; i64; usize; isize) fn $method);
forward_val_val_binop!(impl $impl for (primitive i8; u8; i16; u16; u32; i32; u64; i64; usize; isize, BigInt) fn $method);
};
Expand Down Expand Up @@ -1121,6 +1125,18 @@ mod tests {
//
#[test]
fn int_op_bigint() {
// Minus
assert_eq!(big_int(1) - big_int(1), big_int(0));
assert_eq!(&big_int(1) - big_int(1), big_int(0));
assert_eq!(big_int(1) - &big_int(1), big_int(0));
assert_eq!(&big_int(1) - &big_int(1), big_int(0));

// Add
assert_eq!(big_int(1) + big_int(1), big_int(2));
assert_eq!(&big_int(1) + big_int(1), big_int(2));
assert_eq!(big_int(1) + &big_int(1), big_int(2));
assert_eq!(&big_int(1) + &big_int(1), big_int(2));

// BitAnd
assert_eq!(1 as i32 & big_int(1), big_int(1));
assert_eq!(1 as i64 & big_int(1), big_int(1));
Expand Down

0 comments on commit f24b7c9

Please sign in to comment.