Fix manual_split_once lint
The lint checks for `str::splitn(2,_)` which is non ideal because it
is not super clear you are just splitting the str into two parts.
`split_once` is more explicit and does the same thing and is what this
commit does. Replace `splitn(2,_)` with `split_once(_)`.
@@ -32,7 +32,7 @@ pub(crate) fn authorize_user(
validation: &Validation,
) -> AuthorizationResult {
let token = match get_authorization_token(request) {
- Ok(token) => match token.splitn(2, ':').nth(1) {
+ Ok(token) => match token.split_once(':').map(|x| x.1) {
Some(token) => token.to_string(),
None => {
debug!("Invalid token; should be in the format 'Biome:<JWT>'");
