Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fetch tests (first batch) #3977

Merged
merged 3 commits into from
Dec 27, 2016
Merged

Fetch tests (first batch) #3977

merged 3 commits into from
Dec 27, 2016

Conversation

tomusdrw
Copy link
Collaborator

Tests for content fetch, dapp fetch and web-based streaming.

@tomusdrw tomusdrw added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Dec 27, 2016
Conflicts:
	dapps/src/lib.rs
/// Set a fetch client to use.
pub fn with_fetch(&mut self, fetch: FetchClient) {
self.fetch = Some(fetch);
pub fn fetch<X: Fetch>(self, fetch: X) -> ServerBuilder<X> {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not pub fn fetch(self, fetch: T) -> Self?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It would need type hints when calling ServerBuilder::new() in such case and builder would be tied to a single implementation of Fetch.
Currently you can just do ServerBuilder::new() to have a default implementation and then call fetch(fetch_instance) to change the type. We use different fetch only for tests.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2ed212b on fetch-tests into ** on master**.

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Dec 27, 2016
@gavofyork gavofyork merged commit bc3dacc into master Dec 27, 2016
@gavofyork gavofyork deleted the fetch-tests branch December 27, 2016 15:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants