Update README

This commit is contained in:
daleclack 2022-02-14 11:59:10 +08:00
parent 7f2cb6e049
commit 2f88ac90cd
1 changed files with 7 additions and 2 deletions

View File

@ -77,7 +77,7 @@ public class Args{
}
```
Rust Version ( Currently only support Linux or macOS )
Rust Version
```rust
use std::env;
@ -89,7 +89,12 @@ fn main() {
// Handle the path string
let exec_len: usize = 13;
let length: usize = execpath.len() - exec_len;
let length: usize;
if cfg!(target_os = "windows") {
length = execpath.len() - exec_len - 4;
} else {
length = execpath.len() - exec_len;
}
let path: &str = &execpath[0..length];
// Print the path of executive