Remove .unwrap() to prevent crashes

This commit is contained in:
sharkdp 2020-10-01 20:25:33 +02:00 committed by David Peter
parent 9c4c3e965b
commit a46191b8bf
1 changed files with 3 additions and 6 deletions

View File

@ -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();