Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 8 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ jobs:
name: janitorial
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
profile: minimal
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
toolchain: stable
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo fmt --check

test:
name: test
runs-on: ${{ matrix.os }}
Expand All @@ -44,14 +36,9 @@ jobs:
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --target=${{ matrix.target }}
- run: cargo test --release --target=${{ matrix.target }}
6 changes: 2 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ jobs:
- name: Install dependencies
run: |
sudo apt install -y curl jq
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Publish release
run: ./.github/release.sh ${{ secrets.CRATES_IO_TOKEN }}
18 changes: 4 additions & 14 deletions espmonitor/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ use std::{
io::{Error as IoError, ErrorKind},
};

#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum, Default)]
pub enum Framework {
#[default]
Baremetal,
EspIdf,
}
Expand Down Expand Up @@ -58,14 +59,9 @@ impl TryFrom<&str> for Framework {
}
}

impl Default for Framework {
fn default() -> Self {
Framework::Baremetal
}
}

#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum, Default)]
pub enum Chip {
#[default]
ESP32,
ESP32S2,
ESP8266,
Expand Down Expand Up @@ -132,12 +128,6 @@ impl TryFrom<&str> for Chip {
}
}

impl Default for Chip {
fn default() -> Self {
Chip::ESP32
}
}

#[derive(Parser, Debug)]
#[command(author, version, about)]
pub struct AppArgs {
Expand Down