-
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
code cleanupTasks that require general code improvements to improve readabilityTasks that require general code improvements to improve readabilitygood first issueGood for newcomersGood for newcomersperformance
Description
These functions in CompanionSlice should create new Array directly to remove input type-check performed by scala.Array(a, b, c ... )
@inline final def apply[T: ClassTag](a: T, b: T, c: T): Slice[T] = Slice.wrap(Array(a, b, c))
@inline final def apply[T: ClassTag](a: T, b: T, c: T, d: T): Slice[T] = Slice.wrap(Array(a, b, c, d))
...For example
@inline final def apply[T: ClassTag](a: T, b: T, c: T): Slice[T] = {
val array = new Array[T](3)
array(0) = a
array(1) = b
array(2) = c
Slice.wrap(array)
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
code cleanupTasks that require general code improvements to improve readabilityTasks that require general code improvements to improve readabilitygood first issueGood for newcomersGood for newcomersperformance