From a7230390823c477d139668a9b3b47798497cdf49 Mon Sep 17 00:00:00 2001 From: Jeff Baskin Date: Sun, 3 May 2026 10:44:33 -0400 Subject: [PATCH] Removed warnings from delete tests. --- tests/delete_test.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/delete_test.rs b/tests/delete_test.rs index 3a8dd4e..439a244 100644 --- a/tests/delete_test.rs +++ b/tests/delete_test.rs @@ -10,7 +10,7 @@ use support::{setup_range, TestDocument}; #[test] fn can_delete() { let data = "fred"; - let mut mtt = MoreThanText::new(); + let mtt = MoreThanText::new(); let client = mtt.client(); let test_doc = TestDocument::new(vec![FieldType::StaticString]); client.create_document(test_doc.get_docdef()).unwrap(); @@ -29,7 +29,7 @@ fn can_delete() { fn can_delete_specific() { let selected = 1; let (test_env, test_doc) = setup_range(3); - let mut mtt = test_env.get_morethantext(); + let mtt = test_env.get_morethantext(); let client = mtt.client(); let mut calc = Calculation::new(Operand::Equal); calc.add_value(selected.clone()).unwrap(); @@ -69,7 +69,7 @@ fn can_delete_multiple() { let selected: i128 = 2; // must be less than count and not less than 0 let bound = selected + 1; let (test_env, test_doc) = setup_range(count.clone().try_into().unwrap()); - let mut mtt = test_env.get_morethantext(); + let mtt = test_env.get_morethantext(); let client = mtt.client(); let mut calc = Calculation::new(Operand::GreaterThan); calc.add_value(CalcValue::Existing(FieldType::Integer)) @@ -112,7 +112,7 @@ fn can_delete_multiple() { #[test] fn does_delete_error_on_a_bad_query() { let (test_env, test_doc) = setup_range(1); - let mut mtt = test_env.get_morethantext(); + let mtt = test_env.get_morethantext(); let client = mtt.client(); let bad_name = Name::japanese("正しくない"); let mut delete = Delete::new(test_doc.get_doc_name()); @@ -132,11 +132,13 @@ fn does_delete_error_on_a_bad_query() { #[test] fn does_delete_update_indexes() { let id = "something"; - let mut mtt = MoreThanText::new(); + let mtt = MoreThanText::new(); let client = mtt.client(); let test_doc = TestDocument::new(vec![FieldType::StaticString]); let mut docdef = test_doc.get_docdef(); - docdef.add_index(&test_doc.get_field_name(0), IndexType::Unique); + docdef + .add_index(&test_doc.get_field_name(0), IndexType::Unique) + .unwrap(); client.create_document(docdef).unwrap(); test_doc.populate(mtt.clone(), vec![id]); client @@ -154,7 +156,7 @@ fn does_delete_update_indexes() { fn does_delete_send_trigger() { let selected = 2; let (mut test_env, test_doc) = setup_range(3); - let mut mtt = test_env.get_morethantext(); + let mtt = test_env.get_morethantext(); let client = mtt.client(); test_env.register_channel(vec![Path::new( Include::All,