1
Fork 0
mirror of https://github.com/RGBCube/color.v synced 2025-07-30 17:37:45 +00:00

Remove enforcement

This commit is contained in:
RGBCube 2022-12-01 12:28:20 +03:00
parent 5af7644eee
commit e821cb4f5c

View file

@ -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