Skip to content

Commit

Permalink
fix: make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Sep 20, 2021
1 parent dbc8429 commit 0a07919
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion telegram/query/cached/compute_hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ func (s *ContactsGetContacts) computeHash(v *tg.ContactsContacts) int64 {
h.Update(uint32(contact.UserID))
}

return int64(h.Sum())
return h.Sum()
}
2 changes: 1 addition & 1 deletion telegram/updates/internal/e2e/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func testManager(t *testing.T, f func(s *server, storage updates.StateStorage) c
for i := 0; i < 30; i++ {
c := s.peers.createChannel(fmt.Sprintf("channel-%d", i))
require.NoError(t, storage.SetChannelPts(123, c.ChannelID, 0))
require.NoError(t, hasher.SetChannelAccessHash(123, c.ChannelID, int64(c.ChannelID*2)))
require.NoError(t, hasher.SetChannelAccessHash(123, c.ChannelID, c.ChannelID*2))
}

e := updates.New(updates.Config{
Expand Down
2 changes: 1 addition & 1 deletion telegram/updates/internal/e2e/peer_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (p *peerDatabase) createChannel(username string) *tg.PeerChannel {
ID: p.id,
Username: username,
}
p.channels[p.id].SetAccessHash(int64(p.id * 2))
p.channels[p.id].SetAccessHash(p.id * 2)

defer func() { p.id++ }()
return &tg.PeerChannel{ChannelID: p.id}
Expand Down
2 changes: 1 addition & 1 deletion telegram/updates/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (s *state) handleChannel(channelID int64, date, pts, ptsCount int, cu chann
state.PushUpdate(cu)
}

func (s *state) newChannelState(channelID int64, accessHash int64, initialPts int) *channelState {
func (s *state) newChannelState(channelID, accessHash int64, initialPts int) *channelState {
return newChannelState(channelStateConfig{
Outchan: s.internalQueue,
InitialPts: initialPts,
Expand Down

0 comments on commit 0a07919

Please sign in to comment.