mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-01 19:02:22 +01:00
Update dependencies; replace unmaintained (#1522)
* Update dependencies; replace unmaintained * Fix errors * Revert dependency changes * Revert git2 to 0.13.15 Co-authored-by: David Peter <mail@david-peter.de>
This commit is contained in:
@@ -297,7 +297,7 @@ mod tests {
|
||||
|
||||
use std::fs::File;
|
||||
use std::io::Write;
|
||||
use tempdir::TempDir;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use crate::input::Input;
|
||||
|
||||
@@ -312,8 +312,7 @@ mod tests {
|
||||
SyntaxDetectionTest {
|
||||
assets: HighlightingAssets::from_binary(),
|
||||
syntax_mapping: SyntaxMapping::builtin(),
|
||||
temp_dir: TempDir::new("bat_syntax_detection_tests")
|
||||
.expect("creation of temporary directory"),
|
||||
temp_dir: TempDir::new().expect("creation of temporary directory"),
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,10 +19,10 @@ impl BatProjectDirs {
|
||||
let config_dir_op = env::var_os("XDG_CONFIG_HOME")
|
||||
.map(PathBuf::from)
|
||||
.filter(|p| p.is_absolute())
|
||||
.or_else(|| dirs::home_dir().map(|d| d.join(".config")));
|
||||
.or_else(|| dirs_next::home_dir().map(|d| d.join(".config")));
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let config_dir_op = dirs::config_dir();
|
||||
let config_dir_op = dirs_next::config_dir();
|
||||
|
||||
let config_dir = config_dir_op.map(|d| d.join("bat"))?;
|
||||
|
||||
@@ -43,10 +43,10 @@ impl BatProjectDirs {
|
||||
let cache_dir_op = env::var_os("XDG_CACHE_HOME")
|
||||
.map(PathBuf::from)
|
||||
.filter(|p| p.is_absolute())
|
||||
.or_else(|| dirs::home_dir().map(|d| d.join(".cache")));
|
||||
.or_else(|| dirs_next::home_dir().map(|d| d.join(".cache")));
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
let cache_dir_op = dirs::cache_dir();
|
||||
let cache_dir_op = dirs_next::cache_dir();
|
||||
|
||||
cache_dir_op.map(|d| d.join("bat"))
|
||||
}
|
||||
|
Reference in New Issue
Block a user