Skip to content

Commit

Permalink
Removed excess bool variable assignment in ifs
Browse files Browse the repository at this point in the history
  • Loading branch information
temoto committed Feb 3, 2013
1 parent 2d12eba commit 38545db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand All @@ -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)
Expand Down

0 comments on commit 38545db

Please sign in to comment.