summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsharkdp <davidpeter@web.de>2020-10-01 20:25:33 +0200
committerDavid Peter <sharkdp@users.noreply.github.com>2020-10-01 21:06:37 +0200
commita46191b8bfb69b18a0865b6c7d2b0fabf4011ede (patch)
tree6780570a74f1b9a7f812336dc6bc4ab5ca703bed /src
parent9c4c3e965bfa8fe8367fc8539ab0af3cbc602221 (diff)
Remove .unwrap() to prevent crashes
Diffstat (limited to 'src')
-rw-r--r--src/syntax_mapping.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/syntax_mapping.rs b/src/syntax_mapping.rs
index 2137d391..55e041d2 100644
--- a/src/syntax_mapping.rs
+++ b/src/syntax_mapping.rs
@@ -111,8 +111,7 @@ impl<'a> SyntaxMapping<'a> {
&git_config_path
.join("config")
.into_os_string()
- .to_str()
- .unwrap(),
+ .to_string_lossy(),
MappingTarget::MapTo("Git Config"),
)
.unwrap();
@@ -122,8 +121,7 @@ impl<'a> SyntaxMapping<'a> {
&git_config_path
.join("ignore")
.into_os_string()
- .to_str()
- .unwrap(),
+ .to_string_lossy(),
MappingTarget::MapTo("Git Ignore"),
)
.unwrap();
@@ -133,8 +131,7 @@ impl<'a> SyntaxMapping<'a> {
&git_config_path
.join("attributes")
.into_os_string()
- .to_str()
- .unwrap(),
+ .to_string_lossy(),
MappingTarget::MapTo("Git Attributes"),
)
.unwrap();