From 3f2133c65e18ece56d197a078ef84f0987b05a4d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 4 Dec 2020 16:05:39 +0200 Subject: [PATCH] examples,tools: cleanup most warnings --- cmd/tools/modules/vgit/vgit.v | 2 +- cmd/tools/vcomplete.v | 4 ++-- examples/hanoi.v | 2 +- examples/net_raw_http.v | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmd/tools/modules/vgit/vgit.v b/cmd/tools/modules/vgit/vgit.v index 201f3e00f8..a074b4497a 100644 --- a/cmd/tools/modules/vgit/vgit.v +++ b/cmd/tools/modules/vgit/vgit.v @@ -27,7 +27,7 @@ pub fn validate_commit_exists(commit string) { if commit.len == 0 { return } - cmd := "git cat-file -t \'$commit\' " + cmd := "git cat-file -t '$commit' " if !scripting.exit_0_status(cmd) { eprintln('Commit: "$commit" does not exist in the current repository.') exit(3) diff --git a/cmd/tools/vcomplete.v b/cmd/tools/vcomplete.v index 3e8b7cb124..8d28d1caba 100644 --- a/cmd/tools/vcomplete.v +++ b/cmd/tools/vcomplete.v @@ -259,7 +259,7 @@ compdef _v v mut lines := []string{} list := auto_complete_request(sub_args[1..]) for entry in list { - lines << "COMPREPLY+=(\'$entry\')" + lines << "COMPREPLY+=('$entry')" } println(lines.join('\n')) } @@ -281,7 +281,7 @@ compdef _v v mut lines := []string{} list := auto_complete_request(sub_args[1..]) for entry in list { - lines << 'compadd -U -S \"\" -- \'$entry\';' + lines << "compadd -U -S \"\" -- '$entry';" } println(lines.join('\n')) } diff --git a/examples/hanoi.v b/examples/hanoi.v index eded0b2fd8..a97c4da0a6 100644 --- a/examples/hanoi.v +++ b/examples/hanoi.v @@ -8,7 +8,7 @@ fn main() { } fn move(n int, a string, b string) int { - println('Disc $n from $a to $b\...') + println('Disc $n from $a to ${b}...') return 0 } diff --git a/examples/net_raw_http.v b/examples/net_raw_http.v index 7ae5608b8a..e23fd61aa8 100644 --- a/examples/net_raw_http.v +++ b/examples/net_raw_http.v @@ -1,6 +1,5 @@ // Simple raw HTTP head request import net -import time import io // Make a new connection