borrow opti for now reason
This commit is contained in:
parent
f17a1a86a9
commit
360e76177b
@ -1202,7 +1202,10 @@ fn extract_textures(paths:Vec<std::path::PathBuf>,vpk_paths:Vec<std::path::PathB
|
|||||||
//search pak list
|
//search pak list
|
||||||
for vpk_index in vpk_list{
|
for vpk_index in vpk_list{
|
||||||
if let Some(vpk_entry)=vpk_index.tree.get(search_file_name.as_str()){
|
if let Some(vpk_entry)=vpk_index.tree.get(search_file_name.as_str()){
|
||||||
return Ok(Some(vpk_entry.get()?.to_vec()));
|
return Ok(Some(match vpk_entry.get()?{
|
||||||
|
std::borrow::Cow::Borrowed(bytes)=>bytes.to_vec(),
|
||||||
|
std::borrow::Cow::Owned(bytes)=>bytes,
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok::<Option<Vec<u8>>,anyhow::Error>(None)
|
Ok::<Option<Vec<u8>>,anyhow::Error>(None)
|
||||||
|
Loading…
Reference in New Issue
Block a user