Skip to content

Commit d0b8734

Browse files
committed
fix warnings
1 parent 451ce2b commit d0b8734

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

git/libgit.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module git
22

3-
import time
3+
// import time
44

55
//#include "stdint.h"
66

@@ -207,7 +207,7 @@ pub fn (r &Repo) show_file_blob(branch string, file_path string) !string {
207207
}
208208

209209
content := C.git_blob_rawcontent(blob)
210-
size := C.git_blob_rawsize(blob)
210+
// size := C.git_blob_rawsize(blob)
211211

212212
C.printf(c'Content of %s (from branch %s):\n', file_path.str, branch.str)
213213
// C.fwrite(content, 1, size, C.stdout)

src/comment.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mut:
1717

1818
['/:username/:repo_name/comments'; post]
1919
pub fn (mut app App) handle_add_comment(username string, repo_name string) vweb.Result {
20-
repo := app.find_repo_by_name_and_username(repo_name, username) or { return app.not_found() }
20+
app.find_repo_by_name_and_username(repo_name, username) or { return app.not_found() }
2121
text := app.form['text']
2222
issue_id := app.form['issue_id']
2323
is_text_empty := validation.is_string_empty(text)

src/repo.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ fn (mut r Repo) clone() {
773773
}
774774

775775
fn (r &Repo) read_file(branch string, path string) string {
776-
valid_path := path.trim_string_left('/')
776+
// valid_path := path.trim_string_left('/')
777777

778778
println('yEPP')
779779
t := time.now()

src/repo_routes.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub fn (mut app App) handle_tree(username string, repo_name string) vweb.Result
156156

157157
['/:username/:repo_name/tree/:branch_name']
158158
pub fn (mut app App) handle_branch_tree(username string, repo_name string, branch_name string) vweb.Result {
159-
repo := app.find_repo_by_name_and_username(repo_name, username) or { return app.not_found() }
159+
app.find_repo_by_name_and_username(repo_name, username) or { return app.not_found() }
160160

161161
return app.tree(username, repo_name, branch_name, '')
162162
}
@@ -199,7 +199,7 @@ pub fn (mut app App) handle_new_repo(name string, clone_url string, description
199199
app.error('The repository name is too long (should be fewer than ${max_repo_name_len} characters)')
200200
return app.new()
201201
}
202-
repo := app.find_repo_by_name_and_username(name, app.user.username) or {
202+
app.find_repo_by_name_and_username(name, app.user.username) or {
203203
app.error('A repository with the name "${name}" already exists')
204204
return app.new()
205205
}

0 commit comments

Comments
 (0)