Skip to content

Commit

Permalink
sumdb: remove redundant type conversion
Browse files Browse the repository at this point in the history
Change-Id: I01f5804ab0bc0d41192e55c7f0523178108a5e94
GitHub-Last-Rev: 14e3b91
GitHub-Pull-Request: #13
Reviewed-on: https://go-review.googlesource.com/c/mod/+/428978
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
  • Loading branch information
cuishuang authored and gopherbot committed Sep 7, 2022
1 parent 8f535f7 commit 02c9913
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sumdb/note/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func ExampleSign_add_signatures() {
}
verifiers := note.VerifierList(verifier)

n, err := note.Open([]byte(msg), verifiers)
n, err := note.Open(msg, verifiers)
if err != nil {
fmt.Println(err)
return
Expand Down
2 changes: 1 addition & 1 deletion sumdb/note/note_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func newSignerFromEd25519Seed(name string, seed []byte) (Signer, error) {

s := &signer{
name: name,
hash: uint32(hash),
hash: hash,
sign: func(msg []byte) ([]byte, error) {
return ed25519.Sign(priv, msg), nil
},
Expand Down
2 changes: 1 addition & 1 deletion sumdb/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (s *TestServer) Lookup(ctx context.Context, m module.Version) (int64, error
s.lookup = make(map[string]int64)
}
s.lookup[key] = id
hashes, err := tlog.StoredHashesForRecordHash(id, tlog.RecordHash([]byte(data)), s.hashes)
hashes, err := tlog.StoredHashesForRecordHash(id, tlog.RecordHash(data), s.hashes)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 02c9913

Please sign in to comment.