From 89aa012e3559859f7dc2271301e7f6f2668750d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BE=AA?= Date: Mon, 26 Aug 2024 21:42:45 +1200 Subject: [PATCH] make the code in BasicUsage.rst to compile I can't compile the code with scala3.5.0 . I made some changes to compile --- docs/BasicUsage.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/BasicUsage.rst b/docs/BasicUsage.rst index b701c767..e71fd684 100644 --- a/docs/BasicUsage.rst +++ b/docs/BasicUsage.rst @@ -97,6 +97,7 @@ The minimal complete snippet looks as follows: package com.example.myModule + import scala.concurrent.duration.DurationInt import scala.concurrent.{Await, Future} import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration.Duration @@ -115,7 +116,7 @@ The minimal complete snippet looks as follows: } def main(args: Array[String]): Unit = - val f = Await.ready(greet(), Duration(1.seconds)) + val f = Await.ready(greet(), 1.seconds) f.failed.map { ex => println(ex.getMessage) }