Skip to content

Commit

Permalink
feat(element): better constant display
Browse files Browse the repository at this point in the history
  • Loading branch information
henryhchchc committed Nov 21, 2023
1 parent 6488aa8 commit fda2192
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/elements/field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ impl Display for ConstantValue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
ConstantValue::Null => write!(f, "null"),
ConstantValue::Integer(value) => write!(f, "{}", value),
ConstantValue::Float(value) => write!(f, "{}", value),
ConstantValue::Long(value) => write!(f, "{}L", value),
ConstantValue::Double(value) => write!(f, "{}D", value),
ConstantValue::Integer(value) => write!(f, "int({})", value),
ConstantValue::Float(value) => write!(f, "float({})", value),
ConstantValue::Long(value) => write!(f, "long({})", value),
ConstantValue::Double(value) => write!(f, "double({})", value),
ConstantValue::String(value) => value.fmt(f),
ConstantValue::Class(value) => write!(f, "{}", value),
ConstantValue::Class(value) => write!(f, "{}.class", value),
ConstantValue::Handle(value) => write!(f, "{:?}", value),
ConstantValue::MethodType(value) => write!(f, "{:?}", value),
ConstantValue::Dynamic(bootstrap_method_attr_index, name, field_type) => {
Expand Down

0 comments on commit fda2192

Please sign in to comment.