mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
ohos: Remove unneeded dirs dependency in servo_config (#34166)
`dirs` does not support OpenHarmony, and it also seems that there currently is no native API that `dirs` could use on OpenHarmony and the directory needs to be read from ArkTS. Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
This commit is contained in:
parent
2f6ca9407b
commit
07aa561295
2 changed files with 4 additions and 3 deletions
|
@ -25,5 +25,5 @@ servo_url = { path = "../url" }
|
|||
style_config = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
||||
[target.'cfg(not(target_os = "android"))'.dependencies]
|
||||
[target.'cfg(not(any(target_os = "android", target_env = "ohos")))'.dependencies]
|
||||
dirs = "5.0"
|
||||
|
|
|
@ -12,7 +12,8 @@ use std::path::PathBuf;
|
|||
unix,
|
||||
not(target_os = "macos"),
|
||||
not(target_os = "ios"),
|
||||
not(target_os = "android")
|
||||
not(target_os = "android"),
|
||||
not(target_env = "ohos")
|
||||
))]
|
||||
pub fn default_config_dir() -> Option<PathBuf> {
|
||||
let mut config_dir = ::dirs::config_dir().unwrap();
|
||||
|
@ -21,7 +22,7 @@ pub fn default_config_dir() -> Option<PathBuf> {
|
|||
Some(config_dir)
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
#[cfg(any(target_os = "android", target_env = "ohos"))]
|
||||
pub fn default_config_dir() -> Option<PathBuf> {
|
||||
None
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue