use &T{1,2,3} constructor for simple new cases

R=r
OCL=17691
CL=17719
This commit is contained in:
Russ Cox 2008-10-23 12:41:06 -07:00
parent 071c91bf48
commit de13727f0f
6 changed files with 129 additions and 222 deletions

View file

@ -15,9 +15,7 @@ export type Error struct {
var ErrorTab = new(map[int64] *Error);
export func NewError(s string) *Error {
e := new(Error);
e.s = s;
return e
return &Error{s}
}
export func ErrnoToError(errno int64) *Error {