From 4a70d2fe5160a8ed2f99a2f90769f8bd2b6b673e Mon Sep 17 00:00:00 2001 From: iRedMail <2048991+iredmail@users.noreply.github.com> Date: Sun, 17 May 2020 20:15:04 +0800 Subject: [PATCH] examples: fix 2 unused var warnings --- examples/cli.v | 2 +- vlib/vweb/vweb.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cli.v b/examples/cli.v index 4308f33331..4d9eceabea 100644 --- a/examples/cli.v +++ b/examples/cli.v @@ -41,7 +41,7 @@ fn greet_func(cmd cli.Command) { language := cmd.flags.get_string('language') or { panic('failed to get \'language\' flag: $err') } times := cmd.flags.get_int('times') or { panic('failed to get \'times\' flag: $err') } - for i in 0..times { + for _ in 0..times { match language { 'english' { println('Hello World') } 'german' { println('Hallo Welt') } diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 4384a6baff..7c288dc3e0 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -190,7 +190,7 @@ fn handle_conn(conn net.Socket, app mut T) { mut len := 0 mut body_len := 0 //for line in lines[1..] { - for j in 0..100 { + for _ in 0..100 { //println(j) line := conn.read_line() sline := strip(line)