mirror of https://github.com/astral-sh/ruff
Use `starts_with('/')` instead of `is_absolute` to avoid platform specific API (#11855)
This commit is contained in:
parent
22b6488550
commit
73370fe798
|
|
@ -35,7 +35,7 @@ impl MemoryFileSystem {
|
||||||
let cwd = Utf8PathBuf::from(cwd.as_ref().as_str());
|
let cwd = Utf8PathBuf::from(cwd.as_ref().as_str());
|
||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
cwd.is_absolute(),
|
cwd.starts_with("/"),
|
||||||
"The current working directory must be an absolute path."
|
"The current working directory must be an absolute path."
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue