From c83a7b831174fc121610c533e2ff83dd311036e0 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Fri, 25 Aug 2017 15:11:06 +0200 Subject: [PATCH] refactor --- common/serial/numbers.go | 4 ++-- common/serial/typed_message.proto | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/serial/numbers.go b/common/serial/numbers.go index a81765e7..556fcb34 100644 --- a/common/serial/numbers.go +++ b/common/serial/numbers.go @@ -22,7 +22,7 @@ func ReadUint16(reader io.Reader) (uint16, error) { func WriteUint16(value uint16) func([]byte) (int, error) { return func(b []byte) (int, error) { - b = Uint16ToBytes(value, b[:0]) + Uint16ToBytes(value, b[:0]) return 2, nil } } @@ -37,7 +37,7 @@ func Uint32ToString(value uint32) string { func WriteUint32(value uint32) func([]byte) (int, error) { return func(b []byte) (int, error) { - b = Uint32ToBytes(value, b[:0]) + Uint32ToBytes(value, b[:0]) return 4, nil } } diff --git a/common/serial/typed_message.proto b/common/serial/typed_message.proto index d8b8f308..41ee5a3d 100644 --- a/common/serial/typed_message.proto +++ b/common/serial/typed_message.proto @@ -6,7 +6,7 @@ option go_package = "serial"; option java_package = "com.v2ray.core.common.serial"; option java_multiple_files = true; -// Serialized proto message along with its type name. +// TypedMessage is a serialized proto message along with its type name. message TypedMessage { // The name of the message type, retrieved from protobuf API. string type = 1;