Correct issue-2804 test

This commit is contained in:
Niko Matsakis 2013-05-30 16:55:50 -04:00
parent 9c7eb068e5
commit 21951e503d

View file

@ -25,9 +25,9 @@ fn lookup(table: ~json::Object, key: ~str, default: ~str) -> ~str
{
match table.find(&key)
{
option::Some(&extra::json::String(copy s)) =>
option::Some(&extra::json::String(ref s)) =>
{
copy s
copy *s
}
option::Some(value) =>
{
@ -45,9 +45,9 @@ fn add_interface(store: int, managed_ip: ~str, data: extra::json::Json) -> (~str
{
match &data
{
&extra::json::Object(copy interface) =>
&extra::json::Object(ref interface) =>
{
let name = lookup(copy interface, ~"ifDescr", ~"");
let name = lookup(copy *interface, ~"ifDescr", ~"");
let label = fmt!("%s-%s", managed_ip, name);
(label, bool_value(false))