mirror of
https://git.sr.ht/~sircmpwn/tokidoki
synced 2025-12-12 06:07:22 +01:00
Avoid empty array allocations
This commit is contained in:
parent
e5db18e289
commit
29bf819ab1
1 changed files with 2 additions and 2 deletions
|
|
@ -135,7 +135,7 @@ func createDefaultAddressBook(path string) error {
|
|||
Name: "My contacts",
|
||||
Description: "Default address book",
|
||||
MaxResourceSize: 1024,
|
||||
SupportedAddressData: []carddav.AddressDataType{},
|
||||
SupportedAddressData: nil,
|
||||
}
|
||||
blob, err := json.MarshalIndent(defaultAB, "", " ")
|
||||
if err != nil {
|
||||
|
|
@ -211,7 +211,7 @@ func (b *filesystemBackend) GetAddressObject(ctx context.Context, path string, r
|
|||
}
|
||||
|
||||
func (b *filesystemBackend) loadAll(ctx context.Context, propFilter []string) ([]carddav.AddressObject, error) {
|
||||
result := []carddav.AddressObject{}
|
||||
var result []carddav.AddressObject
|
||||
|
||||
path, err := b.pathForContext(ctx)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue