From ed5116d5da18d1f8f9b8a1d7cbc51f350350e4db Mon Sep 17 00:00:00 2001 From: Nikita Pedorich Date: Mon, 4 Jul 2022 12:30:49 +0200 Subject: [PATCH] Rename self to fact --- .../scala/collection/compat/PackageShared.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala b/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala index 3ab2ad62..b905aa02 100644 --- a/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala +++ b/compat/src/main/scala-2.11_2.12/scala/collection/compat/PackageShared.scala @@ -283,8 +283,8 @@ private[compat] trait PackageShared { self: IterableView[(K, V), C]): MapViewExtensionMethods[K, V, C] = new MapViewExtensionMethods[K, V, C](self) - implicit def toOptionCompanionExtension(self: Option.type): OptionCompanionExtensionMethods = - new OptionCompanionExtensionMethods(self) + implicit def toOptionCompanionExtension(fact: Option.type): OptionCompanionExtensionMethods = + new OptionCompanionExtensionMethods(fact) } class ImmutableSortedMapExtensions(private val fact: i.SortedMap.type) extends AnyVal { @@ -591,7 +591,7 @@ class MutableQueueExtensionMethods[Element](private val self: m.Queue[Element]) self.enqueue(iter.toIndexedSeq: _*) } -class OptionCompanionExtensionMethods(private val self: Option.type) extends AnyVal { +class OptionCompanionExtensionMethods(private val fact: Option.type) extends AnyVal { def when[A](cond: Boolean)(a: => A): Option[A] = if (cond) Some(a) else None @inline def unless[A](cond: Boolean)(a: => A): Option[A] = when(!cond)(a)