Skip to content

Commit

Permalink
Merge pull request #15 from rust-embedded-community/feature/owned-menu
Browse files Browse the repository at this point in the history
Taking ownership of menu in runner
  • Loading branch information
thejpster authored Nov 15, 2023
2 parents 71bbeee + 5194c73 commit bcc2488
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 137 deletions.
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

0 comments on commit bcc2488

Please sign in to comment.