Skip to content

Commit 4e2766e

Browse files
committed
fix: lint error
1 parent 69db43f commit 4e2766e

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

crates/rustapi-core/src/health.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,10 @@ impl HealthCheck {
264264
HealthStatus::Unhealthy { .. } => {
265265
overall_status = HealthStatus::unhealthy("one or more checks failed");
266266
}
267-
HealthStatus::Degraded { .. } => {
268-
if overall_status.is_healthy() {
269-
overall_status = HealthStatus::degraded("one or more checks degraded");
270-
}
267+
HealthStatus::Degraded { .. } if overall_status.is_healthy() => {
268+
overall_status = HealthStatus::degraded("one or more checks degraded");
271269
}
270+
HealthStatus::Degraded { .. } => {}
272271
_ => {}
273272
}
274273

crates/rustapi-core/src/path_validation.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ pub fn validate_path(path: &str) -> Result<(), PathValidationError> {
227227
param_start = None;
228228
}
229229
// Check for invalid characters in path (outside of parameters)
230-
_ if brace_depth == 0 => {
230+
_ if brace_depth == 0
231231
// Allow alphanumeric, -, _, ., /, and common URL characters
232-
if !ch.is_alphanumeric() && !"-_./*".contains(ch) {
233-
return Err(PathValidationError::InvalidCharacter {
234-
path: path.to_string(),
235-
character: ch,
236-
position: i,
237-
});
238-
}
232+
&& !ch.is_alphanumeric() && !"-_./*".contains(ch) =>
233+
{
234+
return Err(PathValidationError::InvalidCharacter {
235+
path: path.to_string(),
236+
character: ch,
237+
position: i,
238+
});
239239
}
240240
_ => {}
241241
}

0 commit comments

Comments
 (0)