Permalink
Browse files

Switch from Predef.format(str, ..) to str.format

  • Loading branch information...
1 parent c5fd5ae commit a04355cd8a6c558b5512b164a423c5877ec2129c @nbronson nbronson committed Mar 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/test/scala/scala/concurrent/stm/examples/RealityShowPhilosophers.scala
@@ -39,7 +39,7 @@ object RealityShowPhilosophers {
def done = mealsEaten.single() == meals
override def toString = {
- format("%s is %5.2f%% done", name, mealsEaten.single() * 100.0 / meals)
+ "%s is %5.2f%% done".format(name, mealsEaten.single() * 100.0 / meals)
}
}
@@ -59,7 +59,7 @@ object RealityShowPhilosophers {
def image: (String, Boolean) = atomic { implicit txn =>
val buf = new StringBuilder
for (i <- 0 until forks.length)
- buf ++= format("fork %d is owned by %s\n", i, forks(i).owner.single())
+ buf ++= "fork %d is owned by %s\n".format(i, forks(i).owner.single())
var done = true
for (p <- philosophers) {
buf ++= p.toString += '\n'

0 comments on commit a04355c

Please sign in to comment.