Permalink
Browse files

! routing: redefine `PathMatchers.Empty` as `PathMatchers.Neutral` wi…

…th explicit type annotation, fixes #339

`Empty` is not a good name for a PathMatcher that always matches without consuming anything, as it can easily be misunderstood as a PathMatcher for `Path.empty`. We therefore rename it here to `Neutral`.
  • Loading branch information...
sirthias committed Jul 4, 2013
1 parent 465d371 commit ee7fe4760064b2d435579d8d34a4baf1e61a65d6
Showing with 2 additions and 1 deletion.
  1. +2 −1 spray-routing/src/main/scala/spray/routing/PathMatcher.scala
@@ -319,8 +319,9 @@ trait PathMatchers {
/**
* A PathMatcher that always matches, doesn't consume anything and extracts nothing.
+ * Serves mainly as a neutral element in PathMatcher composition.
*/
- val Empty = PathMatcher.provide(HNil)
+ val Neutral: PathMatcher[HNil] = PathMatcher.provide(HNil)
/**
* A PathMatcher that matches if the unmatched path starts with a path segment.

0 comments on commit ee7fe47

Please sign in to comment.