From 12c334a77b897f7b1cb6cff3c56a71ecb89c82af Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 21 Jun 2014 03:39:03 -0700 Subject: std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`. [breaking-change] --- src/libstd/collections/lru_cache.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/libstd/collections') 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 = 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()); } } -- cgit 1.4.1-3-g733a5