From 4b22cdc7d1e9561fb1f0e496829905c10e8a3fab Mon Sep 17 00:00:00 2001 From: Ivan Bushchik Date: Fri, 27 Oct 2023 10:20:43 +0300 Subject: [PATCH] 0.2.1: bump smurf to 0.3.0 Signed-off-by: Ivan Bushchik --- Cargo.toml | 4 ++-- src/main.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 38b89d4..9815ab6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "urouter" -version = "0.2.0" +version = "0.2.1" edition = "2021" license = "MIT" repository = "https://github.com/ivabus/urouter" @@ -12,4 +12,4 @@ rocket = "0.5.0-rc.3" serde = { version = "1.0.163", features = ["derive"] } serde_json = "1.0.96" url-escape = "0.1.1" -smurf = "0.2.0" \ No newline at end of file +smurf = "0.3.0" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 8bc587b..808418b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -73,9 +73,9 @@ impl<'r> FromRequest<'r> for UserAgent { fn get_return(alias: &Alias) -> Response { return match alias.is_url { Some(true) => Response::Redirect(Redirect::to(alias.alias.clone())), - _ => Response::Text(RawText( - smurf::io::read_file_to_str(&PathBuf::from(&alias.alias)).unwrap(), - )), + _ => { + Response::Text(RawText(smurf::io::read_file_str(&PathBuf::from(&alias.alias)).unwrap())) + } }; }