Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix float marshal, unmarshall functions #313

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

illia-li
Copy link

@illia-li illia-li commented Oct 17, 2024

Changes:

  1. On unmarshall data which length different from 0 or 4 was no error before, now return an error.
  2. Optimized marshal, unmarshall functions.

@illia-li illia-li force-pushed the il/fix/marshal/float branch 2 times, most recently from 8ce5e89 to 62153cd Compare October 17, 2024 03:56
marshal.go Outdated
@@ -9,6 +9,7 @@ import (
"encoding/binary"
"errors"
"fmt"
"github.com/gocql/gocql/serialization/float"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be below with other gocql/serialization imports

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

switch v := value.(type) {
case nil:
return nil, nil

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this new line needed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted

switch v := value.(type) {
case nil:
return nil

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary new line

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted

Copy link
Collaborator

@dkropachev dkropachev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@illia-li , all good, please get rid of empty lines

@dkropachev dkropachev merged commit 29787d4 into scylladb:master Oct 17, 2024
1 check passed
@illia-li illia-li deleted the il/fix/marshal/float branch October 18, 2024 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants