Skip to content

Commit 21951e5

Browse files
committed
Correct issue-2804 test
1 parent 9c7eb06 commit 21951e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/run-pass/issue-2804.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fn lookup(table: ~json::Object, key: ~str, default: ~str) -> ~str
2525
{
2626
match table.find(&key)
2727
{
28-
option::Some(&extra::json::String(copy s)) =>
28+
option::Some(&extra::json::String(ref s)) =>
2929
{
30-
copy s
30+
copy *s
3131
}
3232
option::Some(value) =>
3333
{
@@ -45,9 +45,9 @@ fn add_interface(store: int, managed_ip: ~str, data: extra::json::Json) -> (~str
4545
{
4646
match &data
4747
{
48-
&extra::json::Object(copy interface) =>
48+
&extra::json::Object(ref interface) =>
4949
{
50-
let name = lookup(copy interface, ~"ifDescr", ~"");
50+
let name = lookup(copy *interface, ~"ifDescr", ~"");
5151
let label = fmt!("%s-%s", managed_ip, name);
5252

5353
(label, bool_value(false))

0 commit comments

Comments
 (0)