Skip to content

Commit

Permalink
Fix some tests and i16 serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
filmor committed Jan 9, 2024
1 parent ba6cd2a commit 4378329
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rustler/src/serde/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'a> ser::Serializer for Serializer<'a> {

#[inline]
fn serialize_i16(self, v: i16) -> Result<Self::Ok, Self::Error> {
v.serialize(self)
(v as i32).serialize(self)
}

#[inline]
Expand Down
4 changes: 2 additions & 2 deletions rustler_tests/test/serde_rustler_tests_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ defmodule SerdeRustlerTests.NifTest do

describe "Unit Types:" do
test "unit", ctx do
run_tests("unit", nil, ctx)
run_tests("unit", {}, ctx)
end

test "unit struct", ctx do
run_tests("unit struct", nil, ctx)
run_tests("unit struct", {}, ctx)
end

test "unit variant", ctx do
Expand Down

0 comments on commit 4378329

Please sign in to comment.