Use &str instead of String whenever possible

This commit is contained in:
2023-01-12 23:43:45 +01:00
parent 13f5c87c03
commit 06389d83f7
14 changed files with 76 additions and 62 deletions

View File

@@ -93,7 +93,7 @@ mod tests {
command.ids.push("456".into());
execute_resp.add_command(command);
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf".to_owned(), ResponsePayload::Execute(execute_resp));
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf", ResponsePayload::Execute(execute_resp));
let json = serde_json::to_string(&resp).unwrap();

View File

@@ -81,7 +81,7 @@ mod tests {
device.state.on = Some(false);
query_resp.add_device("456", device);
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf".to_owned(), ResponsePayload::Query(query_resp));
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf", ResponsePayload::Query(query_resp));
let json = serde_json::to_string(&resp).unwrap();

View File

@@ -85,7 +85,7 @@ mod tests {
sync_resp.add_device(device);
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf".to_owned(), ResponsePayload::Sync(sync_resp));
let resp = Response::new("ff36a3cc-ec34-11e6-b1a0-64510650abcf", ResponsePayload::Sync(sync_resp));
let json = serde_json::to_string(&resp).unwrap();