From 034bf46e4d567ef3fe534b09ac0ca363020f3f58 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 16 May 2020 00:20:14 +0300 Subject: [PATCH] vlib: remove unused arrays module --- vlib/arrays/arrays.v | 11 ----------- vlib/arrays/arrays_test.v | 28 ---------------------------- vlib/net/http/cookie.v | 1 - vlib/net/http/cookie_test.v | 1 - 4 files changed, 41 deletions(-) delete mode 100644 vlib/arrays/arrays.v delete mode 100644 vlib/arrays/arrays_test.v diff --git a/vlib/arrays/arrays.v b/vlib/arrays/arrays.v deleted file mode 100644 index 2c773187bb..0000000000 --- a/vlib/arrays/arrays.v +++ /dev/null @@ -1,11 +0,0 @@ -module arrays - -/* -pub fn range(start, end T) []T { - mut res := []T{} - for i := start; i < end; i++ { - res << i - } - return res -} -*/ diff --git a/vlib/arrays/arrays_test.v b/vlib/arrays/arrays_test.v deleted file mode 100644 index 235f4c1b94..0000000000 --- a/vlib/arrays/arrays_test.v +++ /dev/null @@ -1,28 +0,0 @@ -import arrays - -fn test_range() { - start_pos := 3 - end_pos := 10 - - arr1 := arrays.range(start_pos, end_pos) - assert arr1.len == end_pos - start_pos - for i, c in arr1 { - assert c == i + start_pos - } - - arr2 := arrays.range(start_pos, end_pos) - assert arr2.len == end_pos - start_pos - for i, c in arr2 { - assert c == f32(i + start_pos) - } - - arr3 := arrays.range(start_pos, start_pos - 1) - assert arr3.len == 0 - - arr4 := arrays.range(start_pos, start_pos) - assert arr4.len == 0 - - arr5 := arrays.range(start_pos, start_pos + 1) - assert arr5.len == 1 - assert arr5[0] == start_pos -} diff --git a/vlib/net/http/cookie.v b/vlib/net/http/cookie.v index d2fb5598d0..3ca1654868 100644 --- a/vlib/net/http/cookie.v +++ b/vlib/net/http/cookie.v @@ -4,7 +4,6 @@ module http import time -import arrays import strings pub struct Cookie { diff --git a/vlib/net/http/cookie_test.v b/vlib/net/http/cookie_test.v index 49d2ee9553..a7667e2714 100644 --- a/vlib/net/http/cookie_test.v +++ b/vlib/net/http/cookie_test.v @@ -1,5 +1,4 @@ import net.http -import time struct SetCookieTestCase { cookie &http.Cookie