From e821cb4f5c5f5e89c66f50eec9f2ac343cc201ca Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 1 Dec 2022 12:28:20 +0300 Subject: [PATCH] Remove enforcement --- color/paintbrush.v | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/color/paintbrush.v b/color/paintbrush.v index 667b3da..f762aea 100644 --- a/color/paintbrush.v +++ b/color/paintbrush.v @@ -18,20 +18,6 @@ pub struct BrushParams { } pub fn new_brush(p BrushParams) !Brush { - mut style_counter := map[int]int{} - - for style in p.styles { - if style is Color { - return error('A Color was given instead of a Style') - } - // Style is definitely not a Color - style_counter[typeof(style).idx]++ - - if style_counter[typeof(style).idx] > 1 { - return error('Multiple of the same style was provided') - } - } - return BrushImpl{ fg: p.fg bg: p.bg