From 73370fe7982c789ae91a95fba3e45cc6a054849e Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Thu, 13 Jun 2024 12:35:31 +0100 Subject: [PATCH] Use `starts_with('/')` instead of `is_absolute` to avoid platform specific API (#11855) --- crates/ruff_db/src/file_system/memory.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ruff_db/src/file_system/memory.rs b/crates/ruff_db/src/file_system/memory.rs index cc96255769dd0..2d8a77d882a85 100644 --- a/crates/ruff_db/src/file_system/memory.rs +++ b/crates/ruff_db/src/file_system/memory.rs @@ -35,7 +35,7 @@ impl MemoryFileSystem { let cwd = Utf8PathBuf::from(cwd.as_ref().as_str()); assert!( - cwd.is_absolute(), + cwd.starts_with("/"), "The current working directory must be an absolute path." );