瀏覽代碼

Shorten code.

Blallo 5 年之前
父節點
當前提交
6182d70b91
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      sizer/worker.go

+ 1 - 4
sizer/worker.go

@@ -34,10 +34,7 @@ func (t *Trivella) Scendi() *Trivella {
 
 // TrInit assigns the writer to a Trivella
 func TrInit(writer io.Writer, level uint) *Trivella {
-	var t Trivella
-	t.Writer = writer
-	t.Level = level
-	return &t
+	return &Trivella{Writer: writer, Level: level}
 }
 
 // Ruspa is the asynchronous worker that is in charge of collecting