INNER CODE UNIT · Rust
partial_cmp
vercel-community/rust · crates/vercel_runtime_router/src/lib.rs:97
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(self.cmp(other))
}
}
impl Eq for Route {}
impl PartialEq for Route {
fn eq(&self, other: &Self) -> bool {
self.kind == other.kind
}
}
impl From<&str> for Route {
fn from(file_path: &str) -> Self {
let file_path = file_path.to_string();
let route = file_path.strip_suffix(".rs").unwrap_or(&file_path);