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
+12 -11
View File
@@ -114,9 +114,9 @@ pub fn copy_inputs(
/// node ids (source order). Undo packaging happens at the caller via
/// oakundo's `UndoCommand`.
pub fn copy_subgraph(
graph: &mut Graph,
nodes: &[NodeId],
exclude_items: bool,
_graph: &mut Graph,
_nodes: &[NodeId],
_exclude_items: bool,
) -> crate::error::Result<Vec<NodeId>> {
todo!()
}
@@ -124,22 +124,22 @@ pub fn copy_subgraph(
/// Transform a time range from one node's frame of reference to
/// another's along the connection path (C++ `Node::transform_time_to`).
pub fn transform_time_to(
graph: &Graph,
time: TimeRange,
from: NodeId,
to: NodeId,
_graph: &Graph,
_time: TimeRange,
_from: NodeId,
_to: NodeId,
) -> crate::error::Result<TimeRange> {
todo!()
}
/// Undo-command display strings (C++
/// `get_connect_command_string`/`get_disconnect_command_string`).
pub fn connect_command_string(output: NodeId, input: NodeId, input_id: &str) -> String {
pub fn connect_command_string(_output: NodeId, _input: NodeId, _input_id: &str) -> String {
todo!()
}
/// See [`connect_command_string`].
pub fn disconnect_command_string(output: NodeId, input: NodeId, input_id: &str) -> String {
pub fn disconnect_command_string(_output: NodeId, _input: NodeId, _input_id: &str) -> String {
todo!()
}
@@ -181,8 +181,9 @@ pub fn set_value_at_time_command(
use crate::error::Error;
use crate::keyframe::{Interpolation, Keyframe};
// Determine the mutation from the current state.
let declared = graph
// Determine the mutation from the current state. The declared type is
// validated but not otherwise used yet.
let _declared = graph
.get(node)
.and_then(|e| e.core.input_data_type(input))
.ok_or(Error::NotFound)?;