https://kotlinlang.org logo
Title
d

Dalinar

02/10/2019, 3:16 PM
what is the kotlin way to use
.use
if it is used on the next line? should it be indented or should it be flush with the object on the line above?
d

Dominaezzz

02/10/2019, 3:30 PM
Next line if the line is too long. Up to developer to define too long.
d

Dalinar

02/10/2019, 3:31 PM
yeah, line is very long, multiple lines actually for this code - but the question is - if it is on the next line should it be
.use {
or
(tab).use {
(indented)? .. it seems to look better non-indented to me
d

Dominaezzz

02/10/2019, 3:34 PM
Ah I misread.
I think it should be flush.
c

Czar

02/10/2019, 3:36 PM
someObject
    .use {
        //logic
    }
k

karelpeeters

02/10/2019, 5:45 PM
Just look at what Idea autoformats it to?
d

Dalinar

02/11/2019, 5:28 PM
sure I saw that already, but I wasn't sure if it specifically knew it was a .use or just formatting it according to some general rule (more likely)