Skip to content

Commit

Permalink
refactor: remove unnecessary .to_string() class in example
Browse files Browse the repository at this point in the history
  • Loading branch information
brianheineman committed Jul 19, 2024
1 parent 976a014 commit 6bfff3e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/helloworld/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ fn main() -> Result<()> {
let println_method =
constant_pool.add_method_ref(print_stream_class, "println", "(Ljava/lang/String;)V")?;
let this_class = constant_pool.add_class("HelloWorld")?;
let code_index = constant_pool.add_utf8("Code".to_string())?;
let line_number_table_index = constant_pool.add_utf8("LineNumberTable".to_string())?;
let main_name_index = constant_pool.add_utf8("main".to_string())?;
let main_descriptor_index = constant_pool.add_utf8("([Ljava/lang/String;)V".to_string())?;
let code_index = constant_pool.add_utf8("Code")?;
let line_number_table_index = constant_pool.add_utf8("LineNumberTable")?;
let main_name_index = constant_pool.add_utf8("main")?;
let main_descriptor_index = constant_pool.add_utf8("([Ljava/lang/String;)V")?;

let mut methods = Vec::new();
let Some(Constant::MethodRef {
Expand Down

0 comments on commit 6bfff3e

Please sign in to comment.