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

@@ -12,8 +12,8 @@ pub struct Response {
}
impl Response {
pub fn new(request_id: String, payload: ResponsePayload) -> Self {
Self { request_id, payload }
pub fn new(request_id: &str, payload: ResponsePayload) -> Self {
Self { request_id: request_id.to_owned(), payload }
}
}