From 264ef60602d1a1d88ad6be9ce3356174e3a09a07 Mon Sep 17 00:00:00 2001 From: Edgar Luque Date: Wed, 26 Oct 2022 15:38:05 +0200 Subject: [PATCH] const node new --- Cargo.toml | 3 ++- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ceabdaa..28cc266 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustyman" -version = "0.2.3" +version = "0.3.0" edition = "2021" authors = ["Edgar "] description = "Huffman compression and decompression" @@ -10,6 +10,7 @@ keywords = ["huffman", "compression", "decompression", "lossless", "huffman-codi categories = ["compression", "algorithms"] documentation = "https://docs.rs/rustyman" readme = "README.md" +rust-version = "1.63.0" # array from_fn # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/lib.rs b/src/lib.rs index c675815..d7c4fb8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,7 +49,7 @@ struct Node { } impl Node { - fn new(index: usize, count: usize) -> Self { + const fn new(index: usize, count: usize) -> Self { Self { index, count,