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

Fix-pr-check #5

Merged
merged 7 commits into from
Aug 28, 2022
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
48 changes: 48 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Pull Request

on:
pull_request:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
strategy:
matrix:
include:
- sdk-redist-ref: gemini
cargo-features: --no-default-features --features gemini
- sdk-redist-ref: orion
cargo-features: --no-default-features
name: check
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v1
- name: Check
run: cargo check ${{ matrix.cargo-features }}
- name: Check Examples
run: cargo check ${{ matrix.cargo-features }} --examples
- name: Check Tests
run: cargo check ${{ matrix.cargo-features }} --tests
- name: Doc
run: cargo doc
- name: Style
run: cargo fmt -- --check
- name: Clippy
run: cargo clippy -- -D warnings

dependabot:
name: 'Dependabot'
needs: [build]
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request'}} # Detect that the PR author is dependabot
steps:
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 0 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
create:
tags:
- v*
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "leaprs"
version = "0.0.8-dev"
version = "0.0.9-dev"
edition = "2021"
authors = ["Pierre Lulé <pierre@lule.fr>"]
description = "Safe wrapper for the LeapC Ultraleap (Leap Motion) hand tracking device API."
Expand Down
4 changes: 2 additions & 2 deletions src/digit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<'a> Digit<'a> {
}

#[doc = " Reports whether the finger is more or less straight. @since 3.0.0"]
pub fn is_extended(&self) -> u32 {
self.handle.is_extended
pub fn is_extended(&self) -> bool {
self.handle.is_extended == 1
}
}