aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/args.rs6
-rw-r--r--src/auth.rs10
-rw-r--r--src/renderer.rs10
3 files changed, 13 insertions, 13 deletions
diff --git a/src/args.rs b/src/args.rs
index 4484943..78340dd 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -184,7 +184,7 @@ pub fn parse_args() -> crate::MiniserveConfig {
#[cfg(test)]
mod tests {
use super::*;
- use rstest::rstest_parametrize;
+ use rstest::rstest;
use pretty_assertions::assert_eq;
/// Helper function that creates a `RequiredAuth` structure
@@ -205,7 +205,7 @@ mod tests {
}
}
- #[rstest_parametrize(
+ #[rstest(
auth_string, username, password, encrypt,
case("username:password", "username", "password", "plain"),
case("username:sha256:abcd", "username", "abcd", "sha256"),
@@ -218,7 +218,7 @@ mod tests {
);
}
- #[rstest_parametrize(
+ #[rstest(
auth_string, err_msg,
case(
"foo",
diff --git a/src/auth.rs b/src/auth.rs
index 1c98c10..34c864c 100644
--- a/src/auth.rs
+++ b/src/auth.rs
@@ -168,7 +168,7 @@ fn build_unauthorized_response(
#[cfg(test)]
mod tests {
use super::*;
- use rstest::{rstest, rstest_parametrize, fixture};
+ use rstest::{rstest, fixture};
use pretty_assertions::assert_eq;
/// Return a hashing function corresponds to given name
@@ -180,7 +180,7 @@ mod tests {
}
}
- #[rstest_parametrize(
+ #[rstest(
password, hash_method, hash,
case("abc", "sha256", "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"),
case("abc", "sha512", "ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f"),
@@ -209,7 +209,7 @@ mod tests {
}
}
- #[rstest_parametrize(
+ #[rstest(
should_pass, param_username, param_password, required_username, required_password, encrypt,
case(true, "obi", "hello there", "obi", "hello there", "plain"),
case(false, "obi", "hello there", "obi", "hi!", "plain"),
@@ -254,7 +254,7 @@ mod tests {
.collect()
}
- #[rstest_parametrize(
+ #[rstest(
username, password,
case("usr0", "pwd0"),
case("usr1", "pwd1"),
@@ -288,7 +288,7 @@ mod tests {
), false);
}
- #[rstest_parametrize(
+ #[rstest(
username, password,
case("usr0", "pwd5"),
case("usr1", "pwd4"),
diff --git a/src/renderer.rs b/src/renderer.rs
index c524aa0..face6ff 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -778,27 +778,27 @@ fn css(color_scheme: ColorScheme) -> Markup {
size_background_color = theme.size_background_color,
size_text_color = theme.size_text_color,
error_color = theme.error_color);
- (PreEscaped(css))
+ PreEscaped(css)
}
/// Partial: up arrow
fn arrow_up() -> Markup {
- (PreEscaped("⇪".to_string()))
+ PreEscaped("⇪".to_string())
}
/// Partial: chevron left
fn chevron_left() -> Markup {
- (PreEscaped("◂".to_string()))
+ PreEscaped("◂".to_string())
}
/// Partial: chevron up
fn chevron_up() -> Markup {
- (PreEscaped("▴".to_string()))
+ PreEscaped("▴".to_string())
}
/// Partial: chevron up
fn chevron_down() -> Markup {
- (PreEscaped("▾".to_string()))
+ PreEscaped("▾".to_string())
}
/// Partial: page header