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

add support for local files #157

Merged
merged 3 commits into from
Apr 11, 2023
Merged

Conversation

wolfv
Copy link
Contributor

@wolfv wolfv commented Apr 9, 2023

Unfortunately I couldn't get both the file and reqwest if/else branches to return the same type. I would have liked to factor out the creation of teh "stream" of data into a function, then we could keep all interfaces.

@baszalmstra
Copy link
Collaborator

You can use https://docs.rs/tokio-util/latest/tokio_util/either/enum.Either.html to return the same type of future or stream from an if else branch!

@wolfv
Copy link
Contributor Author

wolfv commented Apr 10, 2023

Thanks, that worked! I had to change the interface to take a URL directly, because the IntoUrl errors out when presented with a file:// scheme... lmk what you think

@wolfv
Copy link
Contributor Author

wolfv commented Apr 10, 2023

unfortunately this moves the parsing of URLs one level "higher" – i think that's fine. What do you think?

@tdejager tdejager merged commit 4fdd492 into conda:main Apr 11, 2023
@wolfv wolfv deleted the add_local_file_support branch April 11, 2023 11:23
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