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

[feature] NETEX IDF: complementary codes on lines #464

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

datanel
Copy link
Member

@datanel datanel commented Nov 15, 2019

No description provided.

let codes: KeysValues = ln
.private_code
.clone()
.map(|pc| vec![("Netex_PrivateCode".into(), pc)].into_iter().collect())
Copy link
Contributor

Choose a reason for hiding this comment

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

I understand why you do that but isn't the following more easy to read?

|pc| {
    let mut codes = BTreeSet::new();
    codes.insert(("Netex_PrivateCode".into(), pc));
    codes
}

Copy link
Member Author

Choose a reason for hiding this comment

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

I did like this before but I finally I copied the code from a guy called Jean
https://github.com/CanalTP/transit_model/blame/master/src/netex_idf/offers.rs#L369
😉

Copy link
Contributor

@woshilapin woshilapin Nov 15, 2019

Choose a reason for hiding this comment

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

lol 😄

@mergify mergify bot merged commit 2aad808 into hove-io:master Nov 15, 2019
@datanel datanel deleted the netex_cc_lines branch November 15, 2019 11:14
@datanel datanel changed the title NETEX IDF: complementary codes on lines [feature] NETEX IDF: complementary codes on lines Nov 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants