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 code and make crate a no_std crate #3

Merged
merged 1 commit into from
Aug 9, 2020
Merged

Improve code and make crate a no_std crate #3

merged 1 commit into from
Aug 9, 2020

Conversation

paolobarbolini
Copy link
Contributor

I decided to go with all changes in a single PR, let me know if you are ok with that.

The only breaking change is extensions returning an Iterator instead of Vec

@fundon
Copy link
Member

fundon commented Aug 9, 2020

Thanks, rebase it. I will publish new version.

Changes:

* all: use full words for `extension` and `mime_type`
* extension: remove unwrap
* lookup: simplify extension extraction
* lookup: simplify mime_type extraction
* extensions: simplify implementation
* extensions: return an Iterator instead of a Vec
* rust: make into a no_std crate
@fundon fundon merged commit f6ecd9c into viz-rs:master Aug 9, 2020
@paolobarbolini
Copy link
Contributor Author

Rebased.

Let me know what you think of bojand/infer#24. We are interested in having an easy way for users to use both the infer crate and this crate when they want to try to sniff the mime type both from the file contents and the file extension. I can open an issue about it later

@fundon
Copy link
Member

fundon commented Aug 9, 2020

Ok, I'm interested in that. I will read the full text tomorrow. :)

Released in v1.0.0.

@paolobarbolini
Copy link
Contributor Author

paolobarbolini commented Aug 9, 2020

😱 v1.0 we were thinking about doing other changes after this

@paolobarbolini
Copy link
Contributor Author

paolobarbolini commented Aug 9, 2020

I guess it could also work this way. What do you think @ririsoft

@fundon
Copy link
Member

fundon commented Aug 10, 2020

@paolobarbolini It's a breaking change, so I think that is ok.

@paolobarbolini
Copy link
Contributor Author

paolobarbolini commented Aug 10, 2020

The thing I was preoccupying for was the possibility of doing further breaking changes @fundon. Anyway, maybe it could also work this way.

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.

None yet

2 participants