Skip to content

Commit

Permalink
Update to Rust 1.74.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XAMPPRocky committed Nov 18, 2023
1 parent d2893c4 commit d8ee447
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.

[toolchain]
channel = "1.73.0"
channel = "1.74.0"
components = ["rustfmt", "clippy"]
3 changes: 1 addition & 2 deletions src/codec/prost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ use prost_types::value::Kind;
use serde_json::Value;

pub fn encode<M: prost::Message>(message: &M) -> Result<Vec<u8>, prost::EncodeError> {
let mut buf = Vec::new();
buf.reserve(message.encoded_len());
let mut buf = Vec::with_capacity(message.encoded_len());
message.encode(&mut buf)?;
Ok(buf)
}
Expand Down

0 comments on commit d8ee447

Please sign in to comment.