aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util
diff options
context:
space:
mode:
authorKeegan McAllister <kmcallister@mozilla.com>2013-08-09 13:41:10 -0700
committerKeegan McAllister <kmcallister@mozilla.com>2013-08-15 13:55:40 -0700
commitffe60ea02704c0bd4545a194bff3f2feafd0133c (patch)
tree97f40c907aae08235e4bc856681cd1eb6df5a274 /src/components/util
parent907d9f23cf8ab5be112376199c3c57ba9e4a3035 (diff)
downloadservo-ffe60ea02704c0bd4545a194bff3f2feafd0133c.tar.gz
servo-ffe60ea02704c0bd4545a194bff3f2feafd0133c.zip
Trait changes, and eliminate 'copy'
Diffstat (limited to 'src/components/util')
-rw-r--r--src/components/util/range.rs1
-rw-r--r--src/components/util/time.rs2
-rw-r--r--src/components/util/url.rs4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/components/util/range.rs b/src/components/util/range.rs
index 72719a97f8d..5742019d2af 100644
--- a/src/components/util/range.rs
+++ b/src/components/util/range.rs
@@ -15,6 +15,7 @@ enum RangeRelation {
EntirelyAfter
}
+#[deriving(Clone)]
pub struct Range {
priv off: uint,
priv len: uint
diff --git a/src/components/util/time.rs b/src/components/util/time.rs
index db3963da08b..aa08619c664 100644
--- a/src/components/util/time.rs
+++ b/src/components/util/time.rs
@@ -26,7 +26,7 @@ impl ProfilerChan {
}
}
-#[deriving(Eq)]
+#[deriving(Eq, Clone)]
pub enum ProfilerCategory {
CompositingCategory,
LayoutQueryCategory,
diff --git a/src/components/util/url.rs b/src/components/util/url.rs
index 4aca0ef67f8..4d08386511d 100644
--- a/src/components/util/url.rs
+++ b/src/components/util/url.rs
@@ -44,7 +44,7 @@ pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
path.push(p.to_str());
}
let path = path.init();
- let mut path = path.iter().transform(|x| copy *x).collect::<~[~str]>();
+ let mut path = path.iter().transform(|x| (*x).clone()).collect::<~[~str]>();
path.push(str_url);
let path = path.connect("/");
@@ -118,6 +118,6 @@ mod make_url_tests {
pub type UrlMap<T> = @mut HashMap<Url, T>;
-pub fn url_map<T: Copy>() -> UrlMap<T> {
+pub fn url_map<T: Clone + 'static>() -> UrlMap<T> {
@mut HashMap::new()
}