--- a/servant-server.cabal
+++ b/servant-server.cabal
@@ -67,7 +67,7 @@
       , transformers       >= 0.3  && < 0.6
       , transformers-compat>= 0.4
       , wai                >= 3.0  && < 3.3
-      , wai-app-static     >= 3.0  && < 3.2
+      , wai-app-static     >= 3.1  && < 3.2
       , warp               >= 3.0  && < 3.3
       , word8              == 0.1.*
 
--- a/src/Servant/Utils/StaticFiles.hs
+++ b/src/Servant/Utils/StaticFiles.hs
@@ -12,9 +12,6 @@
 import           Servant.API.Raw                (Raw)
 import           Servant.Server                 (Server)
 import           System.FilePath                (addTrailingPathSeparator)
-#if !MIN_VERSION_wai_app_static(3,1,0)
-import           Filesystem.Path.CurrentOS      (decodeString)
-#endif
 
 -- | Serve anything under the specified directory as a 'Raw' endpoint.
 --
@@ -38,8 +35,4 @@
 -- in order.
 serveDirectory :: FilePath -> Server Raw
 serveDirectory =
-#if MIN_VERSION_wai_app_static(3,1,0)
     staticApp . defaultFileServerSettings . addTrailingPathSeparator
-#else
-    staticApp . defaultFileServerSettings . decodeString . addTrailingPathSeparator
-#endif
