Drop wrapper surface that was never reachable #14
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
wokoman/ironpod!14
Loading…
Reference in a new issue
No description provided.
Delete branch "chore/trim-unreachable-wrapper-surface"
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?
The decision #11 asked for, and the small part of it that was worth acting on.
The unused surface stays. Fourteen of the track type's sixteen getters are one-line field reads and several have no caller — album artist, composer, disc number, sample rate — as does most of
playlist.rs. Deleting them was weighed and declined for two reasons: this is an FFI mirror of a C struct, where the cost of unused surface is reading past it rather than maintaining it, and playlist editing is the first item on the wishlist, which reclaims most ofplaylist.rsthe day it starts. Deleting now means writing it again soon. The finding is recorded inSPEC.mdunder Phase 1 so a future architecture review does not raise it a third time.What did go is surface that was never right, rather than merely unused:
IpodError::NullPointer— no constructor anywhere, so no caller could ever have matched on it.ResultonDatabase::add_track— the body transfers ownership to libgpod and flips a flag, with no path that fails. Callers were writing?and.expect("add_track")against an error that could not happen.No behaviour change. 61 unit tests pass,
cargo clippy --all-targetsclean.Closes #11.