Skip to content

Commit

Permalink
chore:remove .clone() in config accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricschwyter committed Jul 1, 2023
1 parent 4459c00 commit c13315f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/verify-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,23 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: install cargo-fmt
run: rustup component add rustfmt
- name: install cargo-clippy
run: rustup component add clippy
- name: run cargo:fmt
run: cd src-tauri && cargo fmt --all -- --check
- name: run cargo:clippy
run: cd src-tauri && cargo clippy --all-features -- -D warnings
- name: install frontend dependencies
run: yarn install
- uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run cargo:test
run: cd src-tauri && cargo test --verbose --all-features
- name: Run cargo:fmt
run: cd src-tauri && cargo fmt --all -- --check
- name: Run cargo:clippy
run: cd src-tauri && cargo clippy --all-features -- -D warnings
- name: Setup Tarpaulin
- name: setup Tarpaulin
run: cd src-tauri && cargo install cargo-tarpaulin
continue-on-error: true
- name: Run cargo:tarpaulin
- name: run cargo:tarpaulin (runs cargo test)
run: cd src-tauri && cargo tarpaulin --verbose --all-features --out Xml --output-dir ./coverage
- name: Codecov
uses: codecov/codecov-action@v3
Expand Down
6 changes: 3 additions & 3 deletions src-tauri/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const HUE_BRIDGE_SERVICE_NAME: &str = "_hue._tcp.local";
const HUE_BRIDGE_SERVICE_QUERY_INTERVAL_SECONDS: u64 = 3600;
const HUE_BRIDGE_API_BASE_URL: &str = "/clip/v2";

#[derive(Clone, Debug, Parser)]
#[derive(Debug, Parser)]
#[command(author, version, about)]
pub struct HueHueHueConfig {
#[arg(long)]
Expand Down Expand Up @@ -54,8 +54,8 @@ impl serde::Serialize for HueHueHueError {
}

impl HueHueHue {
pub fn get_config(&self) -> HueHueHueConfig {
self.config.clone()
pub fn get_config(&self) -> &HueHueHueConfig {
&self.config
}

fn get_base_url(&self) -> String {
Expand Down

0 comments on commit c13315f

Please sign in to comment.