clippy: clear the workspace errors and apply the machine fixes
- Mark the raw-pointer interop entry points unsafe with # Safety docs (oak-core upload/download/frame-from-pixels, oak-audio convert) and satisfy the existing callers (tests). - mut_from_ref: allow with the ABI contract documented (the handle get_mut helpers in oak-timeline/oak-render/oak-task take the shared reference the C ABI passes; exclusivity is the caller's unsafe contract). - Fix the eq_op in the white-balance normalization (green / green). - Apply cargo clippy --fix across the workspace (redundant closures and field names, field reassignment, items after test modules, ...). - Revert the replace_box fix in image_effect's clip_define: a redefinition must allocate a new box, otherwise the old clip handle stays valid and the HS-map replace contract (clip != clip2) breaks. - 283 warnings remain; they are all non-machine-applicable (chunks_exact -> as_chunks needs a manual iter_mut, too_many_arguments, complex types, missing Safety docs, ...) and are tracked as the follow-up.
This commit is contained in:
@@ -70,7 +70,7 @@ fn texture_value_drop_releases() {
|
||||
assert_eq!(refs(&h), 2);
|
||||
|
||||
{
|
||||
let v = NodeValue::Texture(h.clone());
|
||||
let v = NodeValue::Texture(h);
|
||||
assert_eq!(refs(&h), 2, "no extra reference taken on clone");
|
||||
drop(v); // must release the payload's reference
|
||||
assert_eq!(refs(&h), 1);
|
||||
@@ -97,7 +97,7 @@ fn texture_value_clone_addrefs() {
|
||||
assert_eq!(refs(&h), 1);
|
||||
|
||||
{
|
||||
let a = NodeValue::Texture(h.clone());
|
||||
let a = NodeValue::Texture(h);
|
||||
assert_eq!(refs(&h), 1, "construction takes the caller's reference");
|
||||
{
|
||||
let b = a.clone();
|
||||
|
||||
Reference in New Issue
Block a user