-
Notifications
You must be signed in to change notification settings - Fork 102
Fix the DurationConverters import in README #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
README.md
Outdated
|
||
val javaDuration: java.time.Duration = 5.seconds.toJava | ||
val finiteDuration: FiniteDuration = javaDuration.toScala | ||
``` | ||
|
||
From Java: | ||
```java | ||
import scala.compat.java8.DurationConverters; | ||
import scala.compat.java8.DurationConverters._; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't the Java syntax something else? like *
instead of _
? and should it be import static
perhaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooops yes, it should be:
import static scala.compat.java8.DurationConverters.*;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have fixed and rebased.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the java import was correct as is, I have reverted back, sorry.
@@ -268,15 +268,15 @@ Example of conversions from the Java type ways: | |||
|
|||
```scala | |||
import scala.concurrent.duration._ | |||
import scala.compat.java8.DurationConverters | |||
import scala.compat.java8.DurationConverters._ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
1e2dc8f
to
a8236f4
Compare
a8236f4
to
490473c
Compare
thanks! |
Fix the Duration examples typo in README.