File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -1309,8 +1309,7 @@ mod tests {
13091309 ) ;
13101310
13111311 assert_eq ! (
1312- body. to_bind_values( & ParameterDescription :: new( vec![ PgTypeId :: FLOAT8 ] ) )
1313- . unwrap( ) ,
1312+ body. to_bind_values( & ParameterDescription :: new( vec![ PgTypeId :: FLOAT8 ] ) ) ?,
13141313 vec![ BindValue :: Float64 ( 3.14 ) ]
13151314 ) ;
13161315 }
@@ -1332,16 +1331,13 @@ mod tests {
13321331 FrontendMessage :: Bind ( body) => {
13331332 assert_eq ! ( body. parameter_formats, vec![ Format :: Binary ] ) ;
13341333
1335- let values = body
1336- . to_bind_values ( & ParameterDescription :: new ( vec ! [ PgTypeId :: FLOAT8 ] ) )
1337- . unwrap ( ) ;
1334+ let values =
1335+ body. to_bind_values ( & ParameterDescription :: new ( vec ! [ PgTypeId :: FLOAT8 ] ) ) ?;
13381336
1339- match & values[ 0 ] {
1340- BindValue :: Float64 ( val) => {
1341- assert ! ( ( val - 3.14 ) . abs( ) < 0.0001 ) ;
1342- }
1343- _ => panic ! ( "Expected Float64 bind value" ) ,
1344- }
1337+ assert_eq ! (
1338+ body. to_bind_values( & ParameterDescription :: new( vec![ PgTypeId :: FLOAT8 ] ) ) ?,
1339+ vec![ BindValue :: Float64 ( 3.14 ) ]
1340+ ) ;
13451341 }
13461342 _ => panic ! ( "Wrong message, must be Bind" ) ,
13471343 }
You can’t perform that action at this time.
0 commit comments