File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
interoperability/java/src Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,12 +22,12 @@ use jni::JNIEnv;
2222/// HelloWorld::hello method implementation.
2323#[ no_mangle]
2424pub extern "system" fn Java_HelloWorld_hello (
25- env : JNIEnv ,
25+ mut env : JNIEnv ,
2626 _class : JClass ,
2727 name : JString ,
2828) -> jstring {
29- let input: String = env. get_string ( name) . unwrap ( ) . into ( ) ;
29+ let input: String = env. get_string ( & name) . unwrap ( ) . into ( ) ;
3030 let greeting = format ! ( "Hello, {input}!" ) ;
3131 let output = env. new_string ( greeting) . unwrap ( ) ;
32- output. into_inner ( )
32+ output. into_raw ( )
3333}
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ fn main() {
2222 logger:: init (
2323 logger:: Config :: default ( )
2424 . with_tag_on_device ( "rust" )
25- . with_min_level ( log:: Level :: Trace ) ,
25+ . with_max_level ( log:: LevelFilter :: Trace ) ,
2626 ) ;
2727 debug ! ( "Starting program." ) ;
2828 info ! ( "Things are going fine." ) ;
You can’t perform that action at this time.
0 commit comments