rename hashmap find/get -> find_copy/get_copy

This commit is contained in:
Daniel Micay
2013-01-23 11:08:33 -05:00
parent bc96fe9c49
commit 203fcbd0f3
4 changed files with 28 additions and 34 deletions

View File

@@ -11,9 +11,6 @@
//! Types/fns concerning URLs (see RFC 3986)
#[forbid(deprecated_mode)];
use map;
use map::HashMap;
use core::cmp::Eq;
use core::dvec::DVec;
use core::from_str::FromStr;
@@ -21,7 +18,6 @@ use core::io::{Reader, ReaderUtil};
use core::io;
use core::prelude::*;
use core::hashmap::linear::LinearMap;
use core::hashmap;
use core::str;
use core::to_bytes::IterBytes;
use core::to_bytes;
@@ -244,9 +240,7 @@ pub fn encode_form_urlencoded(m: &LinearMap<~str, ~[~str]>) -> ~str {
* Decode a string encoded with the 'application/x-www-form-urlencoded' media
* type into a hashmap.
*/
pub fn decode_form_urlencoded(
s: &[u8]
) -> hashmap::linear::LinearMap<~str, ~[~str]> {
pub fn decode_form_urlencoded(s: &[u8]) -> LinearMap<~str, ~[~str]> {
do io::with_bytes_reader(s) |rdr| {
let mut m = LinearMap();
let mut key = ~"";

View File

@@ -173,7 +173,7 @@ impl Database {
declared_inputs: &WorkMap) ->
Option<(WorkMap, WorkMap, ~str)> {
let k = json_encode(&(fn_name, declared_inputs));
match self.db_cache.find(&k) {
match self.db_cache.find_copy(&k) {
None => None,
Some(v) => Some(json_decode(v))
}
@@ -297,7 +297,7 @@ impl @Mut<Prep> : TPrep {
name: &str, val: &str) -> bool {
do self.borrow_imm |p| {
let k = kind.to_owned();
let f = (p.ctxt.freshness.get(&k))(name, val);
let f = (*p.ctxt.freshness.get_ref(&k))(name, val);
do p.ctxt.logger.borrow_imm |lg| {
if f {
lg.info(fmt!("%s %s:%s is fresh",