Skip to content

Commit e2cda6f

Browse files
committed
refact code style
1 parent c831478 commit e2cda6f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

compiler/src/dotty/tools/io/Directory.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Directory(jpath: JPath) extends Path(jpath) {
6767
* until it runs out of contents.
6868
*/
6969
def deepList(depth: Int = -1): Iterator[Path] =
70-
if (depth < 0) list ++ (dirs flatMap (_ deepList (depth)))
70+
if (depth < 0) list ++ (dirs flatMap (_ deepList depth))
7171
else if (depth == 0) Iterator.empty
7272
else list ++ (dirs flatMap (_ deepList (depth - 1)))
7373
}

compiler/src/dotty/tools/io/Streamable.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ object Streamable {
125125
finally stream.close()
126126

127127
def bytes(is: => InputStream): Array[Byte] =
128-
(new Bytes {
128+
new Bytes {
129129
def inputStream() = is
130-
}).toByteArray()
130+
}.toByteArray()
131131

132132
def slurp(is: => InputStream)(implicit codec: Codec): String =
133133
new Chars { def inputStream() = is } slurp codec

compiler/src/dotty/tools/io/VirtualDirectory.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extends AbstractFile {
1818
def path: String =
1919
maybeContainer match {
2020
case None => name
21-
case Some(parent) => parent.path+'/'+ name
21+
case Some(parent) => parent.path + '/' + name
2222
}
2323

2424
def absolute: AbstractFile = this
@@ -54,7 +54,7 @@ extends AbstractFile {
5454

5555
override def fileNamed(name: String): AbstractFile =
5656
Option(lookupName(name, directory = false)) getOrElse {
57-
val newFile = new VirtualFile(name, path+'/'+name)
57+
val newFile = new VirtualFile(name, path + '/' + name)
5858
files(name) = newFile
5959
newFile
6060
}

compiler/src/dotty/tools/io/ZipArchive.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ final class ManifestResources(val url: URL) extends ZipArchive(null) {
240240
private def resourceInputStream(path: String): InputStream = {
241241
new FilterInputStream(null) {
242242
override def read(): Int = {
243-
if(in == null) in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path)
244-
if(in == null) throw new RuntimeException(path + " not found")
243+
if (in == null) in = Thread.currentThread().getContextClassLoader().getResourceAsStream(path)
244+
if (in == null) throw new RuntimeException(path + " not found")
245245
super.read()
246246
}
247247

0 commit comments

Comments
 (0)