mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-15 16:07:51 +03:00
reduce unnessary type assart (#1254)
This commit is contained in:
@@ -230,7 +230,7 @@ func (a *Args) SetBytesKV(key, value []byte) {
|
||||
|
||||
// SetNoValue sets only 'key' as argument without the '='.
|
||||
//
|
||||
// Only key in argumemt, like key1&key2
|
||||
// Only key in argument, like key1&key2
|
||||
func (a *Args) SetNoValue(key string) {
|
||||
a.args = setArg(a.args, key, "", argsNoValue)
|
||||
}
|
||||
|
||||
@@ -2916,14 +2916,15 @@ func (c *pipelineConnClient) getClientName() []byte {
|
||||
|
||||
var errPipelineConnStopped = errors.New("pipeline connection has been stopped")
|
||||
|
||||
func acquirePipelineWork(pool *sync.Pool, timeout time.Duration) *pipelineWork {
|
||||
func acquirePipelineWork(pool *sync.Pool, timeout time.Duration) (w *pipelineWork) {
|
||||
v := pool.Get()
|
||||
if v == nil {
|
||||
v = &pipelineWork{
|
||||
if v != nil {
|
||||
w = v.(*pipelineWork)
|
||||
} else {
|
||||
w = &pipelineWork{
|
||||
done: make(chan struct{}, 1),
|
||||
}
|
||||
}
|
||||
w := v.(*pipelineWork)
|
||||
if timeout > 0 {
|
||||
if w.t == nil {
|
||||
w.t = time.NewTimer(timeout)
|
||||
|
||||
Reference in New Issue
Block a user