We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de91b8a commit bb5bfffCopy full SHA for bb5bfff
plugins/single-instance/src/platform_impl/macos.rs
@@ -105,13 +105,7 @@ fn listen_for_other_instances<A: Runtime>(
105
let mut s = String::new();
106
match stream.read_to_string(&mut s) {
107
Ok(_) => {
108
- let (cwd, args) = {
109
- let mut split = s.split("\0\0");
110
- (
111
- split.next().unwrap_or_default(),
112
113
- )
114
- };
+ let (cwd, args) = s.split_once("\0\0").unwrap_or_default();
115
let args: Vec<String> =
116
args.split('\0').map(String::from).collect();
117
cb(app.app_handle(), args, cwd.to_string());
0 commit comments