Skip to content

Conversation

@Ryman
Copy link
Contributor

@Ryman Ryman commented Jan 27, 2015

It's different from the elided lifetimes, but having at least one explicit shared lifetime has allowed me to actually get the compiler to trust me on some dependent code.

Any concerns on this being too restrictive?

@reem
Copy link
Contributor

reem commented Jan 27, 2015

Should be totally fine, especially since it seems you can elide these lifetimes on implementations with no problem.

@seanmonstar
Copy link
Member

I wonder if this is an example of rust-lang/rfcs#738 ?

@reem
Copy link
Contributor

reem commented Jan 27, 2015

I had the same thought - I'm pretty sure it is, but I'm not certain. I'm not really sure exactly what it is an example of, but its certainly related.

@reem
Copy link
Contributor

reem commented Jan 27, 2015

Anyway I think this is good to go, since the lifetimes are actually always the same.

reem added a commit that referenced this pull request Jan 27, 2015
refactor(server): Add explicit lifetime annotations for Handler trait
@reem reem merged commit 0a92e0d into hyperium:master Jan 27, 2015
@Ryman Ryman deleted the handle_lifetime branch January 27, 2015 02:08
@ashleysommer
Copy link

Oh wow, thank you so much for adding this.
I was maintaining a local modified version of Hyper with exactly this change in Handler, specifically so I could pass the request/response into my system entry point.

@seanmonstar
Copy link
Member

@flubba86 don't keep those issues to yourself! We wanna fix em.

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.

4 participants