ksud: bump dependencies
This commit is contained in:
@@ -344,7 +344,7 @@ fn _install_module(zip: &str) -> Result<()> {
|
||||
zip_extract_file_to_memory(&zip_path, &entry_path, &mut buffer)?;
|
||||
|
||||
let mut module_prop = HashMap::new();
|
||||
PropertiesIter::new_with_encoding(Cursor::new(buffer), encoding::all::UTF_8).read_into(
|
||||
PropertiesIter::new_with_encoding(Cursor::new(buffer), encoding_rs::UTF_8).read_into(
|
||||
|k, v| {
|
||||
module_prop.insert(k, v);
|
||||
},
|
||||
@@ -558,12 +558,13 @@ pub fn uninstall_module(id: &str) -> Result<()> {
|
||||
}
|
||||
let content = std::fs::read(module_prop)?;
|
||||
let mut module_id: String = String::new();
|
||||
PropertiesIter::new_with_encoding(Cursor::new(content), encoding::all::UTF_8)
|
||||
.read_into(|k, v| {
|
||||
PropertiesIter::new_with_encoding(Cursor::new(content), encoding_rs::UTF_8).read_into(
|
||||
|k, v| {
|
||||
if k.eq("id") {
|
||||
module_id = v;
|
||||
}
|
||||
})?;
|
||||
},
|
||||
)?;
|
||||
if module_id.eq(mid) {
|
||||
let remove_file = path.join(defs::REMOVE_FILE_NAME);
|
||||
File::create(remove_file).with_context(|| "Failed to create remove file.")?;
|
||||
@@ -656,7 +657,7 @@ fn _list_modules(path: &str) -> Vec<HashMap<String, String>> {
|
||||
continue;
|
||||
};
|
||||
let mut module_prop_map: HashMap<String, String> = HashMap::new();
|
||||
let encoding = encoding::all::UTF_8;
|
||||
let encoding = encoding_rs::UTF_8;
|
||||
let result =
|
||||
PropertiesIter::new_with_encoding(Cursor::new(content), encoding).read_into(|k, v| {
|
||||
module_prop_map.insert(k, v);
|
||||
|
||||
Reference in New Issue
Block a user