|
|
@ -198,8 +198,8 @@ impl<'de> Deserialize<'de> for FileType {
|
|
|
|
Some((key, suffix)) if key == "suffix" => Ok(FileType::Suffix({
|
|
|
|
Some((key, suffix)) if key == "suffix" => Ok(FileType::Suffix({
|
|
|
|
// FIXME: use `suffix.replace('/', std::path::MAIN_SEPARATOR_STR)`
|
|
|
|
// FIXME: use `suffix.replace('/', std::path::MAIN_SEPARATOR_STR)`
|
|
|
|
// if MSRV is updated to 1.68
|
|
|
|
// if MSRV is updated to 1.68
|
|
|
|
let mut seperator = [0; 1];
|
|
|
|
let mut separator = [0; 1];
|
|
|
|
suffix.replace('/', std::path::MAIN_SEPARATOR.encode_utf8(&mut seperator))
|
|
|
|
suffix.replace('/', std::path::MAIN_SEPARATOR.encode_utf8(&mut separator))
|
|
|
|
})),
|
|
|
|
})),
|
|
|
|
Some((key, _value)) => Err(serde::de::Error::custom(format!(
|
|
|
|
Some((key, _value)) => Err(serde::de::Error::custom(format!(
|
|
|
|
"unknown key in `file-types` list: {}",
|
|
|
|
"unknown key in `file-types` list: {}",
|
|
|
|