Distinguish NoLibrary
/NoDatabase
from EmptyLibrary
/EmptyDatabase
#95
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is a subtle difference between the two.
EmtpyLibrary
is to be used with code that expects a library, but the user does not want to provide one (e.g. using the--no-library
option).NoLibrary
should be used when the code does not expect a library, but the compiler requires a suitable type to be specified.This will remove the
Option
s fromMusicHoard
.To do this nicely and idiomatically, this may require being specific on trait bounds in the
impl
ofMusicHoard
. This wayEmptyLibrary
implementsILibrary
, butNoLibrary
does not.And provide convenience constructors to make the
No
/Empty
variants easy to create. Probably with a builder pattern.