Skip to content

Commit fb96cbb

Browse files
committed
Fix issue with tests
1 parent 903759e commit fb96cbb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ enum object {
2222
int_value(i64),
2323
}
2424

25-
fn lookup(table: Box<json::Object>, key: String, default: String) -> String
25+
fn lookup(table: json::Object, key: String, default: String) -> String
2626
{
2727
match table.find(&key.to_string()) {
2828
option::Some(&json::String(ref s)) => {
29-
(*s).to_string()
29+
s.to_string()
3030
}
3131
option::Some(value) => {
3232
println!("{} was expected to be a string but is a {:?}", key, value);
@@ -42,7 +42,7 @@ fn add_interface(_store: int, managed_ip: String, data: json::Json) -> (String,
4242
{
4343
match &data {
4444
&json::Object(ref interface) => {
45-
let name = lookup((*interface).clone(),
45+
let name = lookup(interface.clone(),
4646
"ifDescr".to_string(),
4747
"".to_string());
4848
let label = format!("{}-{}", managed_ip, name);

0 commit comments

Comments
 (0)