examples,tools: cleanup most warnings

pull/7144/head
Delyan Angelov 2020-12-04 16:05:39 +02:00
parent 7a8d6a7c7b
commit 3f2133c65e
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
4 changed files with 4 additions and 5 deletions

View File

@ -27,7 +27,7 @@ pub fn validate_commit_exists(commit string) {
if commit.len == 0 { if commit.len == 0 {
return return
} }
cmd := "git cat-file -t \'$commit\' " cmd := "git cat-file -t '$commit' "
if !scripting.exit_0_status(cmd) { if !scripting.exit_0_status(cmd) {
eprintln('Commit: "$commit" does not exist in the current repository.') eprintln('Commit: "$commit" does not exist in the current repository.')
exit(3) exit(3)

View File

@ -259,7 +259,7 @@ compdef _v v
mut lines := []string{} mut lines := []string{}
list := auto_complete_request(sub_args[1..]) list := auto_complete_request(sub_args[1..])
for entry in list { for entry in list {
lines << "COMPREPLY+=(\'$entry\')" lines << "COMPREPLY+=('$entry')"
} }
println(lines.join('\n')) println(lines.join('\n'))
} }
@ -281,7 +281,7 @@ compdef _v v
mut lines := []string{} mut lines := []string{}
list := auto_complete_request(sub_args[1..]) list := auto_complete_request(sub_args[1..])
for entry in list { for entry in list {
lines << 'compadd -U -S \"\" -- \'$entry\';' lines << "compadd -U -S \"\" -- '$entry';"
} }
println(lines.join('\n')) println(lines.join('\n'))
} }

View File

@ -8,7 +8,7 @@ fn main() {
} }
fn move(n int, a string, b string) int { 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 return 0
} }

View File

@ -1,6 +1,5 @@
// Simple raw HTTP head request // Simple raw HTTP head request
import net import net
import time
import io import io
// Make a new connection // Make a new connection