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

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