From 8e8a02f4540ca04f56efaba3fd1fa979558ea157 Mon Sep 17 00:00:00 2001 From: Thijs Cadier Date: Sat, 6 Jan 2018 07:38:43 +0100 Subject: [PATCH] Different invalid utf-8 test string --- tests/bulk_operation.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bulk_operation.rs b/tests/bulk_operation.rs index 918d334..a31b456 100644 --- a/tests/bulk_operation.rs +++ b/tests/bulk_operation.rs @@ -65,7 +65,8 @@ fn test_utf8_invalid() { let collection = client.get_collection("rust_driver_test", "bulk_operation_utf8_invalid"); let bulk_operation = collection.create_bulk_operation(None); - let value = unsafe { String::from_utf8_unchecked(vec![10, 11, 12, 13, 14, 15, 16, 17]) }; + let bytes = b"\x80\xae".to_vec(); + let value = unsafe { String::from_utf8_unchecked(bytes) }; let document = doc! {"key_1" => value}; bulk_operation.insert(&document).unwrap(); assert!(bulk_operation.execute().is_ok());