mirror of
https://github.com/RGBCube/color.v
synced 2025-07-30 17:37:45 +00:00
Remove enforcement
This commit is contained in:
parent
5af7644eee
commit
e821cb4f5c
1 changed files with 0 additions and 14 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue