diff --git a/src/sharry/ids.rs b/src/sharry/ids.rs index f2627c1..3fc3dfd 100644 --- a/src/sharry/ids.rs +++ b/src/sharry/ids.rs @@ -106,7 +106,7 @@ mod tests { #[test] fn basic_traits_working() { - let inputs = vec![ + let inputs = [ "", "abcd", "12345", @@ -142,7 +142,7 @@ mod tests { #[test] fn valid_urls_produce_expected_file_id() { // a handful of valid‐looking URLs - let cases = vec![ + let cases = [ ( "http://example.com/api/v2/alias/upload/SID123/files/tus/FID456", "FID456", @@ -169,7 +169,7 @@ mod tests { #[test] fn invalid_urls_return_error() { - let bad_inputs = vec![ + let bad_inputs = [ // missing /api/v2/alias/upload "http://example.com/files/tus/FID", // missing /files/tus diff --git a/src/sharry/json.rs b/src/sharry/json.rs index f6292c9..0131a54 100644 --- a/src/sharry/json.rs +++ b/src/sharry/json.rs @@ -59,7 +59,7 @@ mod tests { #[test] fn nsreq_new_sets_fields_correctly() { - let cases: Vec<(&str, u32)> = vec![ + let cases = [ // simple ASCII name, small view count ("alice", 1), // underscores, mid-range views @@ -95,7 +95,7 @@ mod tests { fn nsreq_new_allows_setting_description() { let longstr = "y".repeat(256); - let cases = vec![ + let cases = [ // simple alphanumeric "A simple test user", // whitespace & punctuation diff --git a/src/sharry/uri.rs b/src/sharry/uri.rs index a6dfaa3..20eb1d8 100644 --- a/src/sharry/uri.rs +++ b/src/sharry/uri.rs @@ -104,7 +104,7 @@ mod tests { #[test] fn basic_traits_working() { - let cases = vec![ + let cases = [ // simple http host "http://example.com", // https host with port @@ -122,7 +122,7 @@ mod tests { #[test] fn valid_urls_produce_expected_uri() { - let cases = vec![ + let cases = [ // simple http host ("http://example.com", "http://example.com"), // https host with port @@ -143,7 +143,7 @@ mod tests { #[test] fn invalid_urls_passed_through() { - let cases = vec![ + let cases = [ // missing “://” "http:/example.com", // missing scheme @@ -165,7 +165,7 @@ mod tests { #[test] fn test_endpoint() { - let cases = vec![ + let cases = [ // simple path ("path/to/something", "/api/v2/path/to/something"), // underscores, hyphens, dots