diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index 41769cb379..fe6572aa28 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -968,20 +968,6 @@ pub fn copy(mut dst []u8, src []u8) int { return min } -// reduce executes a given reducer function on each element of the array, -// resulting in a single output value. -// NOTE: It exists as a method on `[]int` types only. -// See also `arrays.reduce` for same name or `arrays.fold` for same functionality. -[deprecated: 'use arrays.fold instead, this function has less flexibility than arrays.fold'] -[deprecated_after: '2022-10-11'] -pub fn (a []int) reduce(iter fn (int, int) int, accum_start int) int { - mut accum_ := accum_start - for i in a { - accum_ = iter(accum_, i) - } - return accum_ -} - // grow_cap grows the array's capacity by `amount` elements. // Internally, it does this by copying the entire array to // a new memory location (creating a clone). diff --git a/vlib/datatypes/set.v b/vlib/datatypes/set.v index 6c189059d2..26b8854b05 100644 --- a/vlib/datatypes/set.v +++ b/vlib/datatypes/set.v @@ -46,12 +46,6 @@ pub fn (mut set Set[T]) clear() { set.elements = map[T]u8{} } -// equal checks whether the two given sets are equal (i.e. contain all and only the same elements). -[deprecated: 'use set1[T] == set2[T] instead'] -pub fn (l Set[T]) equal(r Set[T]) bool { - return l == r -} - // == checks whether the two given sets are equal (i.e. contain all and only the same elements). pub fn (l Set[T]) == (r Set[T]) bool { if l.elements.len != r.elements.len { @@ -114,12 +108,6 @@ pub fn (l Set[T]) intersection(r Set[T]) Set[T] { return set } -// difference returns the difference of sets. -[deprecated: 'use set1[T] - set2[T] instead'] -pub fn (l Set[T]) difference(r Set[T]) Set[T] { - return l - r -} - // - returns the difference of sets. pub fn (l Set[T]) - (r Set[T]) Set[T] { mut set := l diff --git a/vlib/gg/gg.c.v b/vlib/gg/gg.c.v index 73d42b3aed..b612fbbbda 100644 --- a/vlib/gg/gg.c.v +++ b/vlib/gg/gg.c.v @@ -168,7 +168,6 @@ pub mut: height int clear_pass gfx.PassAction window sapp.Desc - timage_pip sgl.Pipeline [deprecated: 'Use `Context.pipeline.alpha` instead!'] pipeline &PipelineContainer = unsafe { nil } config Config user_data voidptr @@ -259,10 +258,6 @@ fn gg_init_sokol_window(user_data voidptr) { ctx.pipeline = &PipelineContainer{} ctx.pipeline.init_pipeline() - // Keep the old pipeline for now, cuz v ui used it. - ctx.timage_pip = ctx.pipeline.alpha - - // if ctx.config.init_fn != unsafe { nil } { $if android { // NOTE on Android sokol can emit resize events *before* the init function is diff --git a/vlib/gg/text_rendering.c.v b/vlib/gg/text_rendering.c.v index 470b61c987..70a0f2de59 100644 --- a/vlib/gg/text_rendering.c.v +++ b/vlib/gg/text_rendering.c.v @@ -147,12 +147,6 @@ pub fn (ctx &Context) set_text_cfg(cfg gx.TextCfg) { ctx.ft.fons.vert_metrics(&ascender, &descender, &lh) } -// set_cfg sets the current text configuration -[deprecated: 'use set_text_cfg() instead'] -pub fn (ctx &Context) set_cfg(cfg gx.TextCfg) { - ctx.set_text_cfg(cfg) -} - // draw_text draws the string in `text_` starting at top-left position `x`,`y`. // Text settings can be provided with `cfg`. pub fn (ctx &Context) draw_text(x int, y int, text_ string, cfg gx.TextCfg) { diff --git a/vlib/os/os.v b/vlib/os/os.v index 30d9da99fa..1194ab0874 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -920,9 +920,3 @@ pub fn config_dir() !string { } return error('Cannot find config directory') } - -[deprecated: 'use os.ensure_folder_is_writable instead'] -pub fn is_writable_folder(folder string) !bool { - ensure_folder_is_writable(folder)! - return true -} diff --git a/vlib/v/tests/reflection_sym_test.v b/vlib/v/tests/reflection_sym_test.v index 494c4d8c9f..0bdeef4222 100644 --- a/vlib/v/tests/reflection_sym_test.v +++ b/vlib/v/tests/reflection_sym_test.v @@ -38,15 +38,15 @@ fn test_flag_result() { } fn test_array_sym() { - var := [1, 2] + var := ['abc', 'def'] typ := reflection.type_of(var) assert typ.sym.kind == .array assert typ.sym.language == .v assert typ.sym.methods.len > 0 - assert typ.sym.methods.filter(it.name == 'reduce').len > 0 - assert typ.sym.name == '[]int' + assert typ.sym.methods.filter(it.name == 'join').len > 0 + assert typ.sym.name == '[]string' assert (typ.sym.info as reflection.Array).nr_dims == 1 - assert (typ.sym.info as reflection.Array).elem_type == typeof[int]().idx + assert (typ.sym.info as reflection.Array).elem_type == typeof[string]().idx } fn test_sumtype_sym() {