Use starts_with('/') instead of is_absolute to avoid platform specific API (#11855)

This commit is contained in:
Micha Reiser 2024-06-13 12:35:31 +01:00 committed by GitHub
parent 22b6488550
commit 73370fe798
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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."
); );