MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / assert_sqlx_code

Function assert_sqlx_code

tests/client_compat.rs:1077–1083  ·  view source on GitHub ↗
(err: &sqlx::Error, expected: &str)

Source from the content-addressed store, hash-verified

1075}
1076
1077fn assert_sqlx_code(err: &sqlx::Error, expected: &str) {
1078 let code = err
1079 .as_database_error()
1080 .and_then(|db| db.code())
1081 .map(|code| code.into_owned());
1082 assert_eq!(code.as_deref(), Some(expected));
1083}
1084
1085fn startup_control_packet(code: i32, tail: &[u8]) -> Vec<u8> {
1086 let len = 8 + tail.len() as i32;

Calls

no outgoing calls

Tested by

no test coverage detected