From 38545dbae82fbb96b45986dcda1fcb87114904e2 Mon Sep 17 00:00:00 2001 From: Sergey Shepelev Date: Sun, 3 Feb 2013 06:48:19 +0400 Subject: [PATCH] Removed excess bool variable assignment in `if`s --- mux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mux.go b/mux.go index 27d7591..3857173 100644 --- a/mux.go +++ b/mux.go @@ -51,7 +51,7 @@ type Router struct { // Match matches registered routes against the request. func (r *Router) Match(req *http.Request, match *RouteMatch) bool { for _, route := range r.routes { - if matched := route.Match(req, match); matched { + if route.Match(req, match) { return true } } @@ -71,7 +71,7 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { } var match RouteMatch var handler http.Handler - if matched := r.Match(req, &match); matched { + if r.Match(req, &match) { handler = match.Handler setVars(req, match.Vars) setCurrentRoute(req, match.Route)