Skip to content

Commit 2e5a6e0

Browse files
Fix Rust formatting violations in middleware.rs
Co-Authored-By: Jiwon Choi <[email protected]>
1 parent 20c6d01 commit 2e5a6e0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crates/next-api/src/middleware.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,11 @@ fn get_default_middleware_matcher(
5353
if skip_internal {
5454
if let Some(base_path) = base_path {
5555
// Escape special regex characters in basePath inline
56-
let escaped_base_path: String = base_path.chars()
56+
let escaped_base_path: String = base_path
57+
.chars()
5758
.map(|c| match c {
58-
'.' | '*' | '+' | '?' | '^' | '$' | '{' | '}' | '(' | ')' | '|' | '[' | ']' | '\\' => {
59+
'.' | '*' | '+' | '?' | '^' | '$' | '{' | '}' | '(' | ')' | '|' | '[' | ']'
60+
| '\\' => {
5961
format!("\\{}", c)
6062
}
6163
_ => c.to_string(),
@@ -206,7 +208,8 @@ impl MiddlewareEndpoint {
206208
.map(|i18n| i18n.locales.len() > 1)
207209
.unwrap_or(false);
208210
let base_path = next_config.base_path().await?;
209-
let skip_middleware_next_internal_routes = next_config.skip_middleware_next_internal_routes().await?;
211+
let skip_middleware_next_internal_routes =
212+
next_config.skip_middleware_next_internal_routes().await?;
210213

211214
let matchers = if let Some(matchers) = config.middleware_matcher.as_ref() {
212215
matchers

0 commit comments

Comments
 (0)