Fixed compilation for Rust master.

This commit is contained in:
Aaron Weiss
2014-12-21 10:25:38 -05:00
parent 6a82297984
commit f9ed262904
2 changed files with 11 additions and 4 deletions

View File

@@ -315,7 +315,7 @@ impl<'a> IntoUrl for &'a str {
}
/// Behavior regarding how to handle redirects within a Client.
#[deriving(Copy, Clone)]
#[deriving(Copy)]
pub enum RedirectPolicy {
/// Don't follow any redirects.
FollowNone,
@@ -325,6 +325,13 @@ pub enum RedirectPolicy {
FollowIf(fn(&Url) -> bool),
}
// This is a hack because of upstream typesystem issues.
impl Clone for RedirectPolicy {
fn clone(&self) -> RedirectPolicy {
*self
}
}
impl Default for RedirectPolicy {
fn default() -> RedirectPolicy {
RedirectPolicy::FollowAll