Skip to content

Commit

Permalink
Remove unecessary cast to bytes from example and code
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiobotaro committed Nov 3, 2021
1 parent 618f2e6 commit b05a4d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class JSONSerializer:
return json.dumps(obj).encode() + NULL_BYTE

def loads(self, data: bytes) -> dict:
data = bytes(data).split(NULL_BYTE, 1)[0]
data = data.split(NULL_BYTE, 1)[0]
return json.loads(data)

```
Expand Down
2 changes: 1 addition & 1 deletion shared_memory_dict/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def dumps(self, obj: dict) -> bytes:
return json.dumps(obj).encode() + NULL_BYTE

def loads(self, data: bytes) -> dict:
data = bytes(data).split(NULL_BYTE, 1)[0]
data = data.split(NULL_BYTE, 1)[0]
return json.loads(data)


Expand Down

0 comments on commit b05a4d1

Please sign in to comment.