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

Taking ownership of menu in runner #15

Merged
merged 7 commits into from
Nov 15, 2023
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
20 changes: 20 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Rust

on: [push, pull_request]

jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check formatting
run: cargo fmt -- --check

build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build
run: cargo build
- name: Run Tests
run: cargo test
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version = "0.3.2"
authors = ["Jonathan 'theJPster' Pallant <[email protected]>"]
description = "A simple #[no_std] command line interface."
license = "MIT OR Apache-2.0"
edition = "2018"
repository = "https://github.com/thejpster/menu"
edition = "2021"
repository = "https://github.com/rust-embedded-community/menu"
readme = "README.md"

[dependencies]
Expand All @@ -15,6 +15,5 @@ readme = "README.md"
default = ["echo"]
echo = []


[dev-dependencies]
pancurses = "0.16"
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,8 @@ It contains multiple paragraphs and should be preceeded by the parameter list.

### Unreleased changes

* None

### v0.3.3

* Changed the `struct Runner` to own the `struct Menu` instead of borrowing it.
* Made `struct Menu` implement `Clone`
* Add the possibility to disable local echo (via echo feature, enabled by default)

### v0.3.2
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fn main() {
window.scrollok(true);
noecho();
let mut buffer = [0u8; 64];
let mut r = Runner::new(&ROOT_MENU, &mut buffer, Output(window));
let mut r = Runner::new(ROOT_MENU, &mut buffer, Output(window));
loop {
match r.context.0.getch() {
Some(Input::Character('\n')) => {
Expand Down
Loading