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

Itemlists2 #24

Open
wants to merge 56 commits into
base: serde
Choose a base branch
from
Open

Itemlists2 #24

wants to merge 56 commits into from

Conversation

stappersg
Copy link
Contributor

No description provided.

tailhook and others added 30 commits August 15, 2017 17:06
This was my misunderstanding of tests in another project. These extra
bools weren't supported earlier and there is no good reason to introduce
them now. At least right now.

This reverts commit a314885.
tailhook and others added 26 commits December 16, 2017 02:49
README.md has a pointer or doc/

doc/README.md, new file, tells it sphinx-doc.
There is now a `main()` which makes it a working program.
Function `work(cfg)` uses the configuration from the YAML file.
Allow that not all fields of the configuration structure are used.
Fixed a typo  ( `macor` versus `macro` )
Bumped the year in sphinx-doc
Document there is more documentation
new file:   examples/item_lists.rs    gets compiled
new file:   examples/journey.yaml     gets read

Item lists gets printed with {:?} debug formatting.

Iteration over a list of items not yet possible.

Contains TODO marker  to validate an enumeration.
@stappersg
Copy link
Contributor Author

Pull Request is for issue #20 and superseeds #21, is against the serde branch.
Would liked to have a staging branch.

Reason for staging is that only partly is works, it does NOT do iterate of a list.

jrny.team is struct Journey fieid team of type Members.
And Members is a Vec<string>.

Upon

    for tm in jrny.team {
        println!("team member {}.", tm);
    }

is compiler error

error[E0507]: cannot move out of borrowed content
  --> examples/item_lists.rs:75:15
   |
75 |     for tm in jrny.team {
   |               ^^^^^^^^^ cannot move out of borrowed content

error: aborting due to previous error

This was referenced Aug 6, 2019

#[derive(Debug,Deserialize)]
struct Members(Vec<String>);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be something like

struct JourneyIter {
   team: Iterator;
   locations: Iterator;
   vehicles: Enumerator:
}

Or does rust-quire that already and have I no clue how to use it? ( Yes,I'm the person that opened #21, Item lists example :-/ )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants