mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix unused import warnings
This commit is contained in:
parent
550e304a21
commit
ea21fdbd48
4 changed files with 9 additions and 7 deletions
|
@ -6,27 +6,27 @@
|
|||
//! For linux based platforms, it uses the XDG base directory spec but provides
|
||||
//! similar abstractions for non-linux platforms.
|
||||
|
||||
extern crate xdg;
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "windows"))]
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::PathBuf;
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
|
||||
use xdg;
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))]
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
|
||||
pub fn default_config_dir() -> Option<PathBuf> {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
|
||||
let config_dir = xdg_dirs.get_config_home();
|
||||
Some(config_dir)
|
||||
}
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))]
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
|
||||
pub fn default_data_dir() -> Option<PathBuf> {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
|
||||
let data_dir = xdg_dirs.get_data_home();
|
||||
Some(data_dir)
|
||||
}
|
||||
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios"), not(target_os = "windows")))]
|
||||
#[cfg(all(unix, not(target_os = "macos"), not(target_os = "ios")))]
|
||||
pub fn default_cache_dir() -> Option<PathBuf> {
|
||||
let xdg_dirs = xdg::BaseDirectories::with_profile("servo", "default").unwrap();
|
||||
let cache_dir = xdg_dirs.get_cache_home();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue