Reduce allocations (#30693)
Removes a unnecessary string conversion and some clones Release Notes: - N/A
This commit is contained in:
parent
fcfe4e2c14
commit
bc99a86bb7
17 changed files with 48 additions and 57 deletions
|
@ -134,7 +134,7 @@ impl From<ErrorCode> for anyhow::Error {
|
|||
RpcError {
|
||||
request: None,
|
||||
code: value,
|
||||
msg: format!("{:?}", value).to_string(),
|
||||
msg: format!("{:?}", value),
|
||||
tags: Default::default(),
|
||||
}
|
||||
.into()
|
||||
|
@ -241,7 +241,7 @@ impl From<ErrorCode> for RpcError {
|
|||
RpcError {
|
||||
request: None,
|
||||
code,
|
||||
msg: format!("{:?}", code).to_string(),
|
||||
msg: format!("{:?}", code),
|
||||
tags: Default::default(),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue