Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated Formatting Fixes #101

Closed
wants to merge 11 commits into from
13 changes: 9 additions & 4 deletions .github/workflows/add-source-header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,24 @@ name: Add Source Header
on:
push:
paths:
- '**/*.rs' # Add paths or file types you want to include
- '**/*.rs'
pull_request:
paths:
- '**/*.rs' # Add paths or file types you want to include
workflow_dispatch: # Allows manual triggering of the workflow
- '**/*.rs'
workflow_dispatch:

jobs:
add-source-header:
if: |
github.event_name == 'workflow_dispatch' ||
(github.actor != 'github-actions[bot]' &&
github.actor != 'YourBotUsername' &&
(github.event.head_commit.author.email != '[email protected]' || github.event.head_commit.author.email == null))
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write # If you need to add labels or comments
issues: write

steps:
- name: Generate GitHub App Token
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ env:

jobs:
build:
if: |
github.event_name == 'workflow_dispatch' ||
(github.actor != 'github-actions[bot]' &&
github.actor != 'YourBotUsername' &&
(github.event.head_commit.author.email != '[email protected]' || github.event.head_commit.author.email == null))
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
8 changes: 6 additions & 2 deletions android/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//
// Copyright 2024 — by The Lindemans, LLC
//
//
//
//
//
//
use core::BluetoothManager;
pub struct AndroidBluetoothManager;

Expand Down
8 changes: 6 additions & 2 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//
// Copyright 2024 — by The Lindemans, LLC
//
//
//
//
//
//
pub trait BluetoothManager {
fn connect(&self) -> Result<(), String>;
fn read_data(&self) -> Result<Vec<u8>, String>;
Expand Down
20 changes: 14 additions & 6 deletions gui/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//
// Copyright 2024 — by The Lindemans, LLC
//
//
//
//
//
//
use leptos::*;
use wasm_bindgen::prelude::*;
use web_sys::{window, HtmlLinkElement, HtmlMetaElement};
Expand Down Expand Up @@ -44,7 +48,11 @@ struct Widget {

impl Widget {
fn new(name: &'static str, widget_aspect_ratio: f64, is_header: bool) -> Self {
Widget { name, widget_aspect_ratio, is_header }
Widget {
name,
widget_aspect_ratio,
is_header,
}
}
}

Expand Down Expand Up @@ -73,9 +81,9 @@ fn App() -> impl IntoView {

// Initialize widgets with static aspect ratios
let widgets = vec![
Widget::new("welliuᴍ", 0.5 / 3.0, false),
Widget::new("Widget 2", 1.5 / 3.0, false),
Widget::new("Widget 3", 2.0 / 3.0, false),
Widget::new("welliuᴍ", 0.5 / 3.0, false),
Widget::new("Widget 2", 1.5 / 3.0, false),
Widget::new("Widget 3", 2.0 / 3.0, false),
Widget::new("Header 2", 0.5 / 3.0, true), //header
Widget::new("Widget 4", 1.0 / 3.0, false),
Widget::new("Widget 5", 1.0 / 3.0, false),
Expand Down
8 changes: 6 additions & 2 deletions ios/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//
// Copyright 2024 — by The Lindemans, LLC
//
//
//
//
//
//
use core::BluetoothManager;
pub struct IosBluetoothManager;

Expand Down
8 changes: 6 additions & 2 deletions main/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
//
// Copyright 2024 — by The Lindemans, LLC
//
//
//
//
//
//
#[cfg(target_os = "android")]
use android_io::connect_bluetooth;

Expand Down
Loading