use smali repr for __str__

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2024-02-14 15:13:46 +01:00
parent 6e207ddc63
commit 458e22b577
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -495,7 +495,7 @@ impl IdField {
let class: String = self.class_.get_name().into();
let name: String = (&self.name).into();
let ty: String = self.type_.get_name().into();
format!("({ty}) {class}.{name}")
format!("{class}->{name}:{ty}")
}
pub fn __repr__(&self) -> String {
@ -596,7 +596,7 @@ impl IdMethod {
pub fn __str__(&self) -> String {
format!(
"{}.{}({}){}",
"{}->{}({}){}",
self.class_.__str__(),
self.name.__str__(),
self.proto
@ -604,7 +604,7 @@ impl IdMethod {
.iter()
.map(|param| param.__str__())
.collect::<Vec<String>>()
.join(", "),
.join(""),
self.proto.return_type.__str__()
)
}