{"record":{"id":"505df435b8d2f56c","repo":"SeaQL/sea-orm","slug":"infallible-505df4","errorCode":null,"errorMessage":"Infallible","messagePattern":"Infallible","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"info","filePath":"sea-orm-sync/src/entity/identity.rs","lineNumber":79,"sourceCode":"\n    fn into_iter(self) -> Self::IntoIter {\n        OwnedIdentityIter {\n            identity: self,\n            index: 0,\n        }\n    }\n}\n\nimpl Iden for Identity {\n    fn quoted(&self) -> Cow<'static, str> {\n        match self {\n            Identity::Unary(iden) => iden.inner(),\n            Identity::Binary(iden1, iden2) => Cow::Owned(format!(\"{iden1}{iden2}\")),\n            Identity::Ternary(iden1, iden2, iden3) => Cow::Owned(format!(\"{iden1}{iden2}{iden3}\")),\n            Identity::Many(vec) => {\n                let mut s = String::new();\n                for iden in vec.iter() {\n                    write!(&mut s, \"{iden}\").expect(\"Infallible\");\n                }\n                Cow::Owned(s)\n            }\n        }\n    }\n\n    fn to_string(&self) -> String {\n        match self.quoted() {\n            Cow::Borrowed(s) => s.to_owned(),\n            Cow::Owned(s) => s,\n        }\n    }\n\n    fn unquoted(&self) -> &str {\n        panic!(\"Should not call this\")\n    }\n}\n","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/SeaQL/sea-orm/blob/e29bcd1b417c41a553b386fe94511d7c64a1c8ec/sea-orm-sync/src/entity/identity.rs#L61-L97","documentation":"In `Identity::quoted()` (the `to_string` path), `write!` into a `String` can only fail if the underlying formatter errors, which cannot happen for `String` targets — hence `.expect(\"Infallible\")`. This is a standard Rust idiom for marking `fmt::Write` results as impossible to fail; it is effectively unreachable for library users.","triggerScenarios":"Only reachable when stringifying an `Identity::Many` identifier. With `std::io::Write` this could fail on OOM/allocation failure, but for `String` formatting it is unconditionally successful.","commonSituations":"Practically never hit by users; would only surface under allocator failure during debug printing of identifiers.","solutions":["No user action required; treat as an unreachable internal assertion.","If ever observed, it indicates memory exhaustion — reduce memory pressure."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch_unwind(|| identity.quoted()) // effectively unreachable; no handling needed","preventionTips":["No action needed; this is an intentionally unreachable assertion."],"tags":["panic","formatting","infallible","sea-orm"],"backgroundTag":"internal-invariant-violation","analyzedSha":"e29bcd1b417c41a553b386fe94511d7c64a1c8ec","analyzedAt":"2026-09-10T11:31:52.468Z","contentChangedAt":"2026-09-10T11:31:52.468Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}