1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert "fmt: re-format parser.v and cgen.v"

This reverts commit 6b2808a3f9.
This commit is contained in:
Alexander Medvednikov
2020-06-23 18:16:24 +02:00
parent 6b2808a3f9
commit 74af88bc92
4 changed files with 68 additions and 50 deletions

View File

@@ -9,7 +9,6 @@ import net
import net.http
import net.urllib
import strings
import time
pub const (
methods_with_form = ['POST', 'PUT', 'PATCH']
@@ -53,7 +52,6 @@ pub mut:
pub struct Result {}
fn (mut ctx Context) send_response_to_client(mimetype string, res string) bool {
//println('send_response_to_client(mimetype=$mimetype)')
if ctx.done { return false }
ctx.done = true
mut sb := strings.new_builder(1024)
@@ -146,9 +144,7 @@ pub fn run_app<T>(mut app T, port int) {
for {
conn := l.accept() or { panic('accept() failed') }
//handle_conn<T>(conn, mut app)
//t := time.ticks()
handle_conn<T>(conn, mut app)
//eprintln('handle conn() took ${time.ticks()-t}ms')
// TODO move this to handle_conn<T>(conn, app)
//message := readall(conn)
//println(message)
@@ -180,7 +176,7 @@ fn handle_conn<T>(conn net.Socket, mut app T) {
//first_line := strip(lines[0])
first_line := conn.read_line()
$if debug {
println('handleconn<T>() firstline="$first_line"')
println('firstline="$first_line"')
}
// Parse the first line