據我所知, std::env::current_exe() 給了我 PathBuf 的所有權,我可以通過返回它來轉移它。現在,我借用它將其轉換為 &str 。從那裡,返回字串的唯一方法是在刪除 PathBuf ...
確定! 回上一頁