Apply rustfmt to launcher services and app
This commit is contained in:
+1
-4
@@ -839,10 +839,7 @@ impl LauncherApp {
|
|||||||
self.restart_queue.push(service);
|
self.restart_queue.push(service);
|
||||||
}
|
}
|
||||||
if ui
|
if ui
|
||||||
.add_enabled(
|
.add_enabled(runtime.started_by_launcher, egui::Button::new("Stop"))
|
||||||
runtime.started_by_launcher,
|
|
||||||
egui::Button::new("Stop"),
|
|
||||||
)
|
|
||||||
.on_disabled_hover_text(
|
.on_disabled_hover_text(
|
||||||
"Started outside this launcher — stop it where it \
|
"Started outside this launcher — stop it where it \
|
||||||
was started.",
|
was started.",
|
||||||
|
|||||||
@@ -80,7 +80,10 @@ impl Service {
|
|||||||
/// instead of two.
|
/// instead of two.
|
||||||
fn resolve_binary(service: Service) -> PathBuf {
|
fn resolve_binary(service: Service) -> PathBuf {
|
||||||
let name = service.binary();
|
let name = service.binary();
|
||||||
if let Some(dir) = std::env::current_exe().ok().and_then(|p| p.parent().map(Path::to_path_buf)) {
|
if let Some(dir) = std::env::current_exe()
|
||||||
|
.ok()
|
||||||
|
.and_then(|p| p.parent().map(Path::to_path_buf))
|
||||||
|
{
|
||||||
let sibling = dir.join(name);
|
let sibling = dir.join(name);
|
||||||
if sibling.is_file() {
|
if sibling.is_file() {
|
||||||
return sibling;
|
return sibling;
|
||||||
@@ -535,10 +538,7 @@ pub fn spawn(
|
|||||||
log.lock().push(format!(
|
log.lock().push(format!(
|
||||||
"[launcher] starting {label}: {}{}",
|
"[launcher] starting {label}: {}{}",
|
||||||
parts.program,
|
parts.program,
|
||||||
parts
|
parts.args.iter().fold(String::new(), |mut acc, a| {
|
||||||
.args
|
|
||||||
.iter()
|
|
||||||
.fold(String::new(), |mut acc, a| {
|
|
||||||
acc.push(' ');
|
acc.push(' ');
|
||||||
acc.push_str(a);
|
acc.push_str(a);
|
||||||
acc
|
acc
|
||||||
|
|||||||
Reference in New Issue
Block a user