diff options
author | David Hewitt <1939362+davidhewitt@users.noreply.github.com> | 2020-01-02 11:49:27 +0000 |
---|---|---|
committer | Christian Duerr <contact@christianduerr.com> | 2020-01-02 11:49:27 +0000 |
commit | f632919134414e31ffd3ae9b5732d673deb0adf5 (patch) | |
tree | 59e74ceabba1d08a5d5966502dda113b11143fc2 /alacritty_terminal/src/config/mod.rs | |
parent | 77acb26d7328f678b26c8aff2ee5706d78949c44 (diff) | |
download | alacritty-f632919134414e31ffd3ae9b5732d673deb0adf5.tar.gz alacritty-f632919134414e31ffd3ae9b5732d673deb0adf5.zip |
Clean up Windows PTY string handling
Removes widestring and dunce dependencies, reduces some code duplication
and corrects a few typos.
Diffstat (limited to 'alacritty_terminal/src/config/mod.rs')
-rw-r--r-- | alacritty_terminal/src/config/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/alacritty_terminal/src/config/mod.rs b/alacritty_terminal/src/config/mod.rs index 3c8a85a4..f3257b7b 100644 --- a/alacritty_terminal/src/config/mod.rs +++ b/alacritty_terminal/src/config/mod.rs @@ -15,7 +15,7 @@ use std::borrow::Cow; use std::collections::HashMap; use std::fmt::Display; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use log::error; use serde::{Deserialize, Deserializer}; @@ -209,8 +209,8 @@ impl<T> Config<T> { } #[inline] - pub fn working_directory(&self) -> &Option<PathBuf> { - &self.working_directory + pub fn working_directory(&self) -> Option<&Path> { + self.working_directory.as_ref().map(|path_buf| path_buf.as_path()) } #[inline] |