Drop wrapper surface that was never reachable #14

Merged
wokoman merged 1 commit from chore/trim-unreachable-wrapper-surface into main 2026-08-28 19:33:08 +02:00
Owner

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 of playlist.rs the day it starts. Deleting now means writing it again soon. The finding is recorded in SPEC.md under 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.
  • The Result on Database::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-targets clean.

Closes #11.

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 of `playlist.rs` the day it starts. Deleting now means writing it again soon. The finding is recorded in `SPEC.md` under 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. - The `Result` on `Database::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-targets` clean. Closes #11.
An error variant with no constructor, and a Result on add_track whose
body cannot fail. The rest of the unused surface stays — it is an FFI
mirror and playlist editing reclaims most of it — recorded in SPEC.md
so the question does not get reopened.

Closes #11.
wokoman deleted branch chore/trim-unreachable-wrapper-surface 2026-08-28 19:33:08 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
wokoman/ironpod!14
No description provided.