diff options
| author | Fuwn <[email protected]> | 2022-04-07 03:43:20 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-07 03:43:20 +0000 |
| commit | c036deca6a0f6df2fa612f24138a61ba74a7ce6e (patch) | |
| tree | f1797a4a25558c6d054d4bf36fb153da6744606c /src/lib.rs | |
| parent | docs(cargo): bump version (diff) | |
| download | windmark-0.1.11.tar.xz windmark-0.1.11.zip | |
fix: try to fix path0.1.11
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -33,15 +33,15 @@ //! # Cargo.toml //! //! [dependencies] -//! windmark = "0.1.10" +//! windmark = "0.1.11" //! tokio = { version = "0.2.4", features = ["full"] } //! //! # If you would like to use the built-in logger (recommended) -//! # windmark = { version = "0.1.10", features = ["logger"] } +//! # windmark = { version = "0.1.11", features = ["logger"] } //! //! # If you would like to use the built-in MIME dedection when `Success`-ing a file //! # (recommended) -//! # windmark = { version = "0.1.10", features = ["auto-deduce-mime"] } +//! # windmark = { version = "0.1.11", features = ["auto-deduce-mime"] } //! ``` //! //! ### Implement a Windmark server @@ -363,7 +363,10 @@ impl Router { } let fixed_path = if self.fix_path { - self.routes.fix_path(url.path()).unwrap() + self + .routes + .fix_path(url.path()) + .unwrap_or_else(|| url.path().to_string()) } else { url.path().to_string() }; |