Fix unused pattern vals warnings in main-command project

This commit is contained in:
Simon Schäfer 2017-10-18 19:59:09 +02:00
parent 0454b873bf
commit ede94cb34c
3 changed files with 4 additions and 4 deletions

View File

@ -46,7 +46,7 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
event match { event match {
case e: ConsolePromptEvent => case e: ConsolePromptEvent =>
askUserThread match { askUserThread match {
case Some(x) => // case Some(_) =>
case _ => case _ =>
val x = makeAskUserThread(e.state) val x = makeAskUserThread(e.state)
askUserThread = Some(x) askUserThread = Some(x)
@ -56,7 +56,7 @@ private[sbt] final class ConsoleChannel(val name: String) extends CommandChannel
e.lastSource match { e.lastSource match {
case Some(src) if src.channelName != name => case Some(src) if src.channelName != name =>
askUserThread match { askUserThread match {
case Some(x) => case Some(_) =>
// keep listening while network-origin command is running // keep listening while network-origin command is running
// make sure to test Windows and Cygwin, if you uncomment // make sure to test Windows and Cygwin, if you uncomment
// shutdown() // shutdown()

View File

@ -111,7 +111,7 @@ class NetworkClient(arguments: List[String]) { self =>
try { try {
connection.publish(bytes) connection.publish(bytes)
} catch { } catch {
case e: SocketException => case _: SocketException =>
// log.debug(e.getMessage) // log.debug(e.getMessage)
// toDel += client // toDel += client
} }

View File

@ -31,7 +31,7 @@ object IPC {
def createServer(attempts: Int): ServerSocket = def createServer(attempts: Int): ServerSocket =
if (attempts > 0) if (attempts > 0)
try { new ServerSocket(nextPort, 1, loopback) } catch { try { new ServerSocket(nextPort, 1, loopback) } catch {
case NonFatal(e) => createServer(attempts - 1) case NonFatal(_) => createServer(attempts - 1)
} else } else
sys.error("Could not connect to socket: maximum attempts exceeded") sys.error("Could not connect to socket: maximum attempts exceeded")
createServer(10) createServer(10)