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

Improve ergonomics when dealing with globs. #4

Open
dunmatt opened this issue Aug 8, 2019 · 3 comments
Open

Improve ergonomics when dealing with globs. #4

dunmatt opened this issue Aug 8, 2019 · 3 comments

Comments

@dunmatt
Copy link

dunmatt commented Aug 8, 2019

Would it be possible to change flatc_rust::Args.inputs to accept things of type AsRef<Path> instead of regular Path? That way it could accept PathBufs as well, which would make it easier to get it to interact with the glob crate.

Would it be easy enough that a intermediate Rustacean might be able to send you a PR?

@frol
Copy link
Owner

frol commented Aug 8, 2019

@dunmatt interestingly enough, two out of two issues about this crate suggest fixing this :) (ref #3)

I am happy to receive PRs! You are very welcome!

@dunmatt
Copy link
Author

dunmatt commented Aug 8, 2019

Uh oh, the other guy finding it prohibitively difficult isn't a good sign... I'll give it a shot but no guarantees...

dunmatt pushed a commit to dunmatt/flatc-rust that referenced this issue Aug 8, 2019
dunmatt pushed a commit to dunmatt/flatc-rust that referenced this issue Aug 8, 2019
@rminderhoud
Copy link
Contributor

Another use case for this is for hard-coded &str paths instead of having to create a Path object for it, e.g.

let flatbuffers = &[
    "buffer1.fbs",
    "buferfer.fbs",
  ];
  
let args_rs = flatc_rust::Args {
    lang: "rust",
    inputs: flatbuffers,
    ..Default::default()
  };

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

No branches or pull requests

3 participants