diff --git a/sa-builder/src/lib.rs b/sa-builder/src/lib.rs index 47a4aef..5cc8140 100644 --- a/sa-builder/src/lib.rs +++ b/sa-builder/src/lib.rs @@ -175,42 +175,42 @@ mod tests { #[test] fn test_build_ssa_libsais() { let mut text = b"ABRACADABRA$".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibSais, 1).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibSais, 1).unwrap(); assert_eq!(sa, vec![11, 10, 7, 0, 3, 5, 8, 1, 4, 6, 9, 2]); } #[test] fn test_build_ssa_libsais_empty() { let mut text = b"".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibSais, 1).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibSais, 1).unwrap(); assert_eq!(sa, vec![]); } #[test] fn test_build_ssa_libsais_sparse() { let mut text = b"ABRACADABRA$".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibSais, 2).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibSais, 2).unwrap(); assert_eq!(sa, vec![10, 0, 8, 4, 6, 2]); } #[test] fn test_build_ssa_libdivsufsort() { let mut text = b"ABRACADABRA$".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibDivSufSort, 1).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibDivSufSort, 1).unwrap(); assert_eq!(sa, vec![11, 10, 7, 0, 3, 5, 8, 1, 4, 6, 9, 2]); } #[test] fn test_build_ssa_libdivsufsort_empty() { let mut text = b"".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibDivSufSort, 1).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibDivSufSort, 1).unwrap(); assert_eq!(sa, vec![]); } #[test] fn test_build_ssa_libdivsufsort_sparse() { let mut text = b"ABRACADABRA$".to_vec(); - let sa = build_ssa(&mut text, &SAConstructionAlgorithm::LibDivSufSort, 2).unwrap(); + let sa = build_ssa(text, &SAConstructionAlgorithm::LibDivSufSort, 2).unwrap(); assert_eq!(sa, vec![10, 0, 8, 4, 6, 2]); }