We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc9d8a3 commit d03cd7fCopy full SHA for d03cd7f
codepropertygraph/src/main/scala/io/shiftleft/Implicits.scala
@@ -43,16 +43,12 @@ object Implicits {
43
}
44
45
46
- /** @see {{{loneElementOption(hint)}}} */
47
- def loneElementOption: Option[A] =
48
- loneElementOption(hint = None)
49
-
50
/** @return
51
* {{{Some(element)}}} if the Iterable has exactly one element, or {{{None}}} if the Iterable has zero or more
52
* than 1 element. Note: if the lone element is {{{null}}}, this will return {{{Some(null)}}}, which is in
53
* accordance with how {{{headOption}}} works.
54
*/
55
- def loneElementOption(hint: String | None.type = None): Option[A] = {
+ def loneElementOption: Option[A] = {
56
val iter = iterable.iterator
57
if (iter.isEmpty) {
58
None
0 commit comments