File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -354,20 +354,19 @@ object MonthConversions:
354
354
trait MonthConverter [A ]:
355
355
def convert (a : A ): String
356
356
357
- given intMonthConverter as MonthConverter [Int ]:
357
+ given intMonthConverter : MonthConverter [Int ] with
358
358
def convert (i : Int ): String =
359
359
i match
360
360
case 1 => " January"
361
361
case 2 => " February"
362
362
// more cases here ...
363
363
364
- given stringMonthConverter as MonthConverter [String ]:
364
+ given stringMonthConverter : MonthConverter [String ] with
365
365
def convert (s : String ): String =
366
366
s match
367
367
case " jan" => " January"
368
368
case " feb" => " February"
369
369
// more cases here ...
370
- }
371
370
```
372
371
373
372
To import those givens into the current scope , use these two `import` statements:
You can’t perform that action at this time.
0 commit comments