about summary refs log tree commit diff
path: root/src/libstd/collections
diff options
context:
space:
mode:
authorRicho Healey <richo@psych0tik.net>2014-06-21 03:39:03 -0700
committerBrian Anderson <banderson@mozilla.com>2014-07-08 13:01:43 -0700
commit12c334a77b897f7b1cb6cff3c56a71ecb89c82af (patch)
tree1f5a85061a69058875391ec6171cf8b446996dff /src/libstd/collections
parentbfe4ddfdea45533c98657701509bb7185fd96cba (diff)
std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.
[breaking-change]
Diffstat (limited to 'src/libstd/collections')
-rw-r--r--src/libstd/collections/lru_cache.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/collections/lru_cache.rs b/src/libstd/collections/lru_cache.rs
index 08f11581e83..a02402271d0 100644
--- a/src/libstd/collections/lru_cache.rs
+++ b/src/libstd/collections/lru_cache.rs
@@ -319,20 +319,20 @@ mod tests {
     }
 
     #[test]
-    fn test_to_str() {
+    fn test_to_string() {
         let mut cache: LruCache<int, int> = LruCache::new(3);
         cache.put(1, 10);
         cache.put(2, 20);
         cache.put(3, 30);
-        assert_eq!(cache.to_str(), "{3: 30, 2: 20, 1: 10}".to_string());
+        assert_eq!(cache.to_string(), "{3: 30, 2: 20, 1: 10}".to_string());
         cache.put(2, 22);
-        assert_eq!(cache.to_str(), "{2: 22, 3: 30, 1: 10}".to_string());
+        assert_eq!(cache.to_string(), "{2: 22, 3: 30, 1: 10}".to_string());
         cache.put(6, 60);
-        assert_eq!(cache.to_str(), "{6: 60, 2: 22, 3: 30}".to_string());
+        assert_eq!(cache.to_string(), "{6: 60, 2: 22, 3: 30}".to_string());
         cache.get(&3);
-        assert_eq!(cache.to_str(), "{3: 30, 6: 60, 2: 22}".to_string());
+        assert_eq!(cache.to_string(), "{3: 30, 6: 60, 2: 22}".to_string());
         cache.change_capacity(2);
-        assert_eq!(cache.to_str(), "{3: 30, 6: 60}".to_string());
+        assert_eq!(cache.to_string(), "{3: 30, 6: 60}".to_string());
     }
 
     #[test]
@@ -343,6 +343,6 @@ mod tests {
         cache.clear();
         assert!(cache.get(&1).is_none());
         assert!(cache.get(&2).is_none());
-        assert_eq!(cache.to_str(), "{}".to_string());
+        assert_eq!(cache.to_string(), "{}".to_string());
     }
 }