diff --git a/lib/src/response/responder.rs b/lib/src/response/responder.rs index 2f7122f0..59de58c9 100644 --- a/lib/src/response/responder.rs +++ b/lib/src/response/responder.rs @@ -1,6 +1,7 @@ use std::fs::File; use std::io::Cursor; use std::fmt; +use std::sync::Arc; use http::{Status, ContentType}; use response::Response; @@ -202,6 +203,13 @@ impl<'r> Responder<'r> for String { } } +impl<'r,R: Responder<'r>> Responder<'r> for Arc { + fn respond_to(self, req: &Request) -> Result, Status> { + self.respond_to(req) + } +} + + /// Returns a response with a sized body for the file. Always returns `Ok`. impl<'r> Responder<'r> for File { fn respond_to(self, _: &Request) -> Result, Status> {