refactor: simplify return statements

Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
Deluan 2026-08-30 12:44:04 -04:00
parent b3ecaddd9c
commit b7ea480576
3 changed files with 3 additions and 6 deletions

View File

@ -123,8 +123,7 @@ func (r *shareRepositoryWrapper) Save(entity any) (string, error) {
s.Contents = str.TruncateRunes(s.Contents, 30, "...")
id, err = r.Persistable.Save(s)
return id, err
return r.Persistable.Save(s)
}
func (r *shareRepositoryWrapper) Update(id string, entity any, _ ...string) error {

View File

@ -205,8 +205,7 @@ func (m *MockArtistRepo) Search(q string, options ...model.QueryOptions) (model.
return nil, errors.New("unexpected error")
}
// Simple mock implementation - just return all artists for testing
allArtists, err := m.GetAll()
return allArtists, err
return m.GetAll()
}
var _ model.ArtistRepository = (*MockArtistRepo)(nil)

View File

@ -319,8 +319,7 @@ func (m *MockMediaFileRepo) Search(q string, options ...model.QueryOptions) (mod
return nil, errors.New("unexpected error")
}
// Simple mock implementation - just return all media files for testing
allFiles, err := m.GetAll()
return allFiles, err
return m.GetAll()
}
// Cross-library move detection mock methods