Skip to content

Commit

Permalink
Fix bad references in documentation (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukagami authored May 13, 2024
1 parent 5583e06 commit dadad1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions shared/src/main/scala/async/AsyncOperations.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ object AsyncOperations:
inline def sleep(duration: FiniteDuration)(using AsyncOperations, Async): Unit =
sleep(duration.toMillis)

/** Runs [[op]] with a timeout. When the timeout occurs, [[op]] is cancelled through the given [[Async]] context, and
* [[TimeoutException]] is thrown.
/** Runs `op` with a timeout. When the timeout occurs, `op` is cancelled through the given [[Async]] context, and
* [[java.util.concurrent.TimeoutException]] is thrown.
*/
def withTimeout[T](timeout: FiniteDuration)(op: Async ?=> T)(using AsyncOperations, Async): T =
Async.group:
Expand All @@ -40,7 +40,7 @@ def withTimeout[T](timeout: FiniteDuration)(op: Async ?=> T)(using AsyncOperatio
throw TimeoutException()
)

/** Runs [[op]] with a timeout. When the timeout occurs, [[op]] is cancelled through the given [[Async]] context, and
/** Runs `op` with a timeout. When the timeout occurs, `op` is cancelled through the given [[Async]] context, and
* [[None]] is returned.
*/
def withTimeoutOption[T](timeout: FiniteDuration)(op: Async ?=> T)(using AsyncOperations, Async): Option[T] =
Expand Down
6 changes: 3 additions & 3 deletions shared/src/main/scala/async/retry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ case class Retry(
maximumFailures: Option[Int] = None,
delay: Delay = Delay.none
):
/** Runs [[body]] with the current policy in its own scope, returning the result or the last failure as an exception.
/** Runs `body` with the current policy in its own scope, returning the result or the last failure as an exception.
*/
def apply[T](op: => T)(using Async, AsyncOperations): T =
var failures = 0
Expand Down Expand Up @@ -50,7 +50,7 @@ case class Retry(
assert(max >= 0)
this.copy(maximumFailures = Some(max))

/** Set the delay policy between runs. See [[Delay]]. */
/** Set the delay policy between runs. See [[Retry.Delay]]. */
def withDelay(delay: Delay) = this.copy(delay = delay)

object Retry:
Expand All @@ -75,7 +75,7 @@ object Retry:
*
* @param failuresCount
* The number of successive failures until the current attempt. Note that if the last attempt was a success,
* [[failuresCount]] is `0`.
* `failuresCount` is `0`.
* @param lastDelay
* The duration of the last delay.
*/
Expand Down

0 comments on commit dadad1a

Please sign in to comment.