mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
remove unnecessary assignment
This commit is contained in:
parent
6f7c30ad51
commit
953bfac572
@ -70,8 +70,8 @@ func TestRandom(t *testing.T) {
|
|||||||
func TestEquals(t *testing.T) {
|
func TestEquals(t *testing.T) {
|
||||||
assert := With(t)
|
assert := With(t)
|
||||||
|
|
||||||
var uuid *UUID = nil
|
var uuid *UUID
|
||||||
var uuid2 *UUID = nil
|
var uuid2 *UUID
|
||||||
assert(uuid.Equals(uuid2), IsTrue)
|
assert(uuid.Equals(uuid2), IsTrue)
|
||||||
|
|
||||||
uuid3 := New()
|
uuid3 := New()
|
||||||
|
@ -103,7 +103,7 @@ func (c *ClientSession) EncodeRequestBody(request *protocol.RequestHeader, write
|
|||||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||||
sizeParser = NewShakeSizeParser(c.requestBodyIV[:])
|
sizeParser = NewShakeSizeParser(c.requestBodyIV[:])
|
||||||
}
|
}
|
||||||
var padding crypto.PaddingLengthGenerator = nil
|
var padding crypto.PaddingLengthGenerator
|
||||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||||
}
|
}
|
||||||
@ -200,7 +200,7 @@ func (c *ClientSession) DecodeResponseBody(request *protocol.RequestHeader, read
|
|||||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||||
sizeParser = NewShakeSizeParser(c.responseBodyIV[:])
|
sizeParser = NewShakeSizeParser(c.responseBodyIV[:])
|
||||||
}
|
}
|
||||||
var padding crypto.PaddingLengthGenerator = nil
|
var padding crypto.PaddingLengthGenerator
|
||||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||||
}
|
}
|
||||||
|
@ -214,7 +214,7 @@ func (s *ServerSession) DecodeRequestBody(request *protocol.RequestHeader, reade
|
|||||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||||
sizeParser = NewShakeSizeParser(s.requestBodyIV[:])
|
sizeParser = NewShakeSizeParser(s.requestBodyIV[:])
|
||||||
}
|
}
|
||||||
var padding crypto.PaddingLengthGenerator = nil
|
var padding crypto.PaddingLengthGenerator
|
||||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||||
}
|
}
|
||||||
@ -293,7 +293,7 @@ func (s *ServerSession) EncodeResponseBody(request *protocol.RequestHeader, writ
|
|||||||
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
if request.Option.Has(protocol.RequestOptionChunkMasking) {
|
||||||
sizeParser = NewShakeSizeParser(s.responseBodyIV[:])
|
sizeParser = NewShakeSizeParser(s.responseBodyIV[:])
|
||||||
}
|
}
|
||||||
var padding crypto.PaddingLengthGenerator = nil
|
var padding crypto.PaddingLengthGenerator
|
||||||
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
if request.Option.Has(protocol.RequestOptionGlobalPadding) {
|
||||||
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
padding = sizeParser.(crypto.PaddingLengthGenerator)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user