workspace: zero compiler warnings across all targets

254 warnings (320 counting replayed-cache re-emitters) cleaned:
unused mut/imports/variables, irrefutable if-lets and unreachable
patterns, dead code removed or annotated #[allow(dead_code)] with
the reason (C++ parity value sets, cfg(test) helpers, public API
reservations), drop(&ref) no-ops removed, fn-pointer identity via
std::ptr::fn_addr_eq, the test-stubs feature declared in
oak-node's manifest, missing docs filled. Every unused-Result site
was judged individually: meaningful errors propagate, intentional
ignores are let _ = with a note.

Two pre-existing latent bugs are documented in place, behavior
preserved: app.rs's timeline-tool observer and dialogs.rs's format
subscription both drop the returned Subscription immediately, so
they never fire.
This commit is contained in:
2026-09-11 16:38:44 +08:00
parent faebc79c31
commit 4f0f5cbba6
98 changed files with 409 additions and 455 deletions
+1 -1
View File
@@ -693,7 +693,7 @@ fn node_behavior_defaults() {
// value / process_samples / generate_frame no-ops.
let mut table = NodeValueTable::default();
let mut row = std::collections::BTreeMap::new();
let row = std::collections::BTreeMap::new();
b.value(&core, &row, Rational::new(0, 1), &mut table);
assert!(table.is_empty());
let mut samples = SampleBuffer::default();
+2 -2
View File
@@ -50,7 +50,7 @@ impl NodeBehavior for TestNode {
fn build(n: usize) -> (Graph, Vec<NodeId>) {
let mut g = Graph::new();
let mut ids = Vec::new();
for i in 0..n {
for _ in 0..n {
let mut core = NodeCore::new();
core.add_input(Input::new(
"val_in",
@@ -159,7 +159,7 @@ fn cycle_rejection() {
/// yields empty order; diamond graph has a valid (stable) order.
#[test]
fn topological_order() {
let mut g = Graph::new();
let g = Graph::new();
assert!(g.topological_order().is_empty());
let (mut g, ids) = build(4);
+2 -2
View File
@@ -79,7 +79,7 @@ fn block_behaviors_and_inputs() {
assert!(clip.footage.is_none());
// Gap.
let (core, behavior) = oak_node::block::gap_create();
let (_core, behavior) = oak_node::block::gap_create();
assert_eq!(behavior.name(), "Gap");
assert_eq!(behavior.type_id(), "org.olivevideoeditor.Olive.gapblock");
let gap = GapBlockBehavior::new();
@@ -287,7 +287,7 @@ fn color_manager_state() {
cm.set_up_default_config().unwrap();
assert!(cm.is_loaded());
let mut empty = ColorManager::new();
let empty = ColorManager::new();
assert!(empty.list_colorspaces().is_empty());
}
+1 -1
View File
@@ -526,7 +526,7 @@ fn assert_full_roundtrip_fields(orig: &oak_node::project::Project, loaded: &oak_
use oak_node::folder::FolderBehavior;
use oak_node::footage::FootageBehavior;
use oak_node::sequence::SequenceBehavior;
use oak_node::track::{TrackBehavior, TrackListBehavior, TrackType};
use oak_node::track::{TrackBehavior, TrackType};
// Project shell: uuid + settings.
assert_eq!(loaded.uuid, orig.uuid, "uuid");
+1 -1
View File
@@ -258,7 +258,7 @@ impl NodeBehavior for Echo {
/// track read at its midpoint feeds 5.
#[test]
fn unconnected_input_evaluates_keyframes_at_time() {
use oak_node::keyframe::{Keyframe, KeyframeTrack};
use oak_node::keyframe::Keyframe;
let mut g = Graph::new();
let mut core = NodeCore::new();
core.add_input(Input::new("val_in", ValueType::Float, NodeValue::Float(0.0)));