Prefer default over new
All checks were successful
Cargo CI / Build and Test (pull_request) Successful in 1m3s
Cargo CI / Lint (pull_request) Successful in 43s

This commit is contained in:
Wojciech Kozlowski 2024-01-12 20:39:48 +01:00
parent 9c126461fc
commit 4a7fafc6bd
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ fn main() {
let db = JsonDatabase::new(JsonDatabaseFileBackend::new(&opt.database_file_path));
let mut music_hoard = MusicHoardBuilder::new().set_database(db).build();
let mut music_hoard = MusicHoardBuilder::default().set_database(db).build();
music_hoard
.load_from_database()
.expect("failed to load database");

View File

@ -85,7 +85,7 @@ fn with_database<DB: IDatabase>(opt: Opt, builder: MusicHoardBuilder<NoLibrary,
fn main() {
let opt = Opt::from_args();
let builder = MusicHoardBuilder::new();
let builder = MusicHoardBuilder::default();
if opt.no_database {
with_database(opt, builder.set_database(NullDatabase));