Summary
Rust does not allow users to use a use-after-free bug when converting a string slice into a owned String value, which is a better way to fix this.
1
Additionally, users can use Option to get out of the commented line, which is not natural.
1
The issue is that the callback function pointer as a parameter is used, and the code used to create a callback function is not static.
2
The fix is that the code should be cloned before entering the async block, and the code should be used to call the callback function.
2
According to