{"record":{"id":"48a6de708f0105d6","repo":"bevyengine/bevy","slug":"err-48a6de","errorCode":null,"errorMessage":"{err}","messagePattern":"\\{err\\}","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/bevy_reflect/src/tuple.rs","lineNumber":411,"sourceCode":"\nimpl<'a> IntoIterator for &'a DynamicTuple {\n    type Item = &'a dyn PartialReflect;\n    type IntoIter = TupleFieldIter<'a>;\n\n    fn into_iter(self) -> Self::IntoIter {\n        self.iter_fields()\n    }\n}\n\n/// Applies the elements of `b` to the corresponding elements of `a`.\n///\n/// # Panics\n///\n/// This function panics if `b` is not a tuple.\n#[inline]\npub fn tuple_apply<T: Tuple>(a: &mut T, b: &dyn PartialReflect) {\n    if let Err(err) = tuple_try_apply(a, b) {\n        panic!(\"{err}\");\n    }\n}\n\n/// Tries to apply the elements of `b` to the corresponding elements of `a` and\n/// returns a Result.\n///\n/// # Errors\n///\n/// This function returns an [`ApplyError::MismatchedKinds`] if `b` is not a tuple or if\n/// applying elements to each other fails.\n#[inline]\npub fn tuple_try_apply<T: Tuple>(a: &mut T, b: &dyn PartialReflect) -> Result<(), ApplyError> {\n    let tuple = b.reflect_ref().as_tuple()?;\n\n    for (i, value) in tuple.iter_fields().enumerate() {\n        if let Some(v) = a.field_mut(i) {\n            v.try_apply(value)?;\n        }","sourceCodeStart":393,"sourceCodeEnd":429,"githubUrl":"https://github.com/bevyengine/bevy/blob/8d743eb7dc7fcff57a7d5744d0bbf89620b1b145/crates/bevy_reflect/src/tuple.rs#L393-L429","documentation":"Panic in tuple_apply (used by PartialReflect::apply for tuples): the error from tuple_try_apply — typically that b is not a reflected Tuple (wrong ReflectKind or arity mismatch) — is unwrapped and panics. Apply only reflected tuples; use tuple_try_apply to handle errors.","triggerScenarios":"Thrown at crates/bevy_reflect/src/tuple.rs:411 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use tuple_try_apply and handle the returned ApplyError","Ensure the applied value reflects as a Tuple with compatible field types"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d743eb7dc7fcff57a7d5744d0bbf89620b1b145","analyzedAt":"2026-08-20T16:12:39.808Z","contentChangedAt":"2026-08-20T16:12:39.808Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}