diff --git a/src/web/auth.rs b/src/web/auth.rs index 6decca8ce..e7e813c44 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -937,7 +937,7 @@ fn unexpired_state(payload: &str, now: i64) -> Option { let age = now.checked_sub(issued.parse::().ok()?)?; (0..=OAUTH_STATE_TTL_SECONDS) .contains(&age) - .then(|| token.to_string()) + .then(|| String::from(token)) } /// The payload of cookie `name`, if it is present and signed for that name.