update to 2024
This commit is contained in:
parent
01426a3d0f
commit
0a77cf2efb
2 changed files with 11 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "patcher"
|
name = "patcher"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,17 +115,17 @@ fn insert_code_model_class_loaders(apk: &mut Apk, data: &RuntimeData) -> Result<
|
||||||
|
|
||||||
// TODO: update Runtime Data to reflect the name change
|
// TODO: update Runtime Data to reflect the name change
|
||||||
|
|
||||||
let apk = if let ApkOrRef::Ref(apk) = class_loaders.remove(&main_cl_id).unwrap().apk {
|
let apk = match class_loaders.remove(&main_cl_id).unwrap().apk { ApkOrRef::Ref(apk) => {
|
||||||
apk
|
apk
|
||||||
} else {
|
} _ => {
|
||||||
panic!("Main APK is not stored as ref?")
|
panic!("Main APK is not stored as ref?")
|
||||||
};
|
}};
|
||||||
for (_, ClassLoader { apk: other, .. }) in class_loaders.into_iter() {
|
for (_, ClassLoader { apk: other, .. }) in class_loaders.into_iter() {
|
||||||
if let ApkOrRef::Owned(other) = other {
|
match other { ApkOrRef::Owned(other) => {
|
||||||
apk.merge(other);
|
apk.merge(other);
|
||||||
} else {
|
} _ => {
|
||||||
panic!("Secondary APK is not stored as owned?")
|
panic!("Secondary APK is not stored as owned?")
|
||||||
}
|
}}
|
||||||
}
|
}
|
||||||
//todo!()
|
//todo!()
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
@ -144,14 +144,14 @@ struct ClassLoader<'a> {
|
||||||
impl ClassLoader<'_> {
|
impl ClassLoader<'_> {
|
||||||
pub fn apk_mut(&mut self) -> &mut Apk {
|
pub fn apk_mut(&mut self) -> &mut Apk {
|
||||||
match &mut self.apk {
|
match &mut self.apk {
|
||||||
ApkOrRef::Owned(ref mut apk) => apk,
|
ApkOrRef::Owned(apk) => apk,
|
||||||
ApkOrRef::Ref(ref mut apk) => apk,
|
ApkOrRef::Ref(apk) => apk,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pub fn apk(&self) -> &Apk {
|
pub fn apk(&self) -> &Apk {
|
||||||
match &self.apk {
|
match &self.apk {
|
||||||
ApkOrRef::Owned(ref apk) => apk,
|
ApkOrRef::Owned(apk) => apk,
|
||||||
ApkOrRef::Ref(ref apk) => apk,
|
ApkOrRef::Ref(apk) => apk,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue