It's kind of unnecessary to take them by value here, and, slower. Use Rust instead!!
return Load(&buf)
}
-func (mi MetaInfo) UnmarshalInfo() (info Info, err error) {
+func (mi *MetaInfo) UnmarshalInfo() (info Info, err error) {
err = bencode.Unmarshal(mi.InfoBytes, &info)
return
}
}
// Encode to bencoded form.
-func (mi MetaInfo) Write(w io.Writer) error {
+func (mi *MetaInfo) Write(w io.Writer) error {
return bencode.NewEncoder(w).Encode(mi)
}