aboutsummaryrefslogtreecommitdiffstats
path: root/gitolfs3-common
diff options
context:
space:
mode:
Diffstat (limited to 'gitolfs3-common')
-rw-r--r--gitolfs3-common/Cargo.toml4
-rw-r--r--gitolfs3-common/src/lib.rs8
2 files changed, 6 insertions, 6 deletions
diff --git a/gitolfs3-common/Cargo.toml b/gitolfs3-common/Cargo.toml
index e0d3c3b..e5fbf75 100644
--- a/gitolfs3-common/Cargo.toml
+++ b/gitolfs3-common/Cargo.toml
@@ -1,11 +1,11 @@
1[package] 1[package]
2name = "gitolfs3-common" 2name = "gitolfs3-common"
3version = "0.1.0" 3version = "0.1.0"
4edition = "2021" 4edition = "2024"
5license = "MIT" 5license = "MIT"
6 6
7[dependencies] 7[dependencies]
8chrono = "0.4" 8chrono = "0.4"
9hmac-sha256 = "1.1" 9hmac-sha256 = "1.1"
10subtle = "2.5" 10subtle = "2.6"
11serde = { version = "1", features = ["derive"] } 11serde = { version = "1", features = ["derive"] }
diff --git a/gitolfs3-common/src/lib.rs b/gitolfs3-common/src/lib.rs
index 917f566..bac5729 100644
--- a/gitolfs3-common/src/lib.rs
+++ b/gitolfs3-common/src/lib.rs
@@ -1,5 +1,5 @@
1use chrono::{DateTime, Utc}; 1use chrono::{DateTime, Utc};
2use serde::{de, Deserialize, Serialize}; 2use serde::{Deserialize, Serialize, de};
3use std::{ 3use std::{
4 fmt::{self, Write}, 4 fmt::{self, Write},
5 ops, 5 ops,
@@ -163,13 +163,13 @@ impl fmt::Display for ReadHexError {
163} 163}
164 164
165fn parse_hex_exact(value: &str, buf: &mut [u8]) -> Result<(), ParseHexError> { 165fn parse_hex_exact(value: &str, buf: &mut [u8]) -> Result<(), ParseHexError> {
166 if value.bytes().len() % 2 == 1 { 166 if value.len() % 2 == 1 {
167 return Err(ParseHexError::UnevenNibbles); 167 return Err(ParseHexError::UnevenNibbles);
168 } 168 }
169 if value.bytes().len() < 2 * buf.len() { 169 if value.len() < 2 * buf.len() {
170 return Err(ParseHexError::TooShort); 170 return Err(ParseHexError::TooShort);
171 } 171 }
172 if value.bytes().len() > 2 * buf.len() { 172 if value.len() > 2 * buf.len() {
173 return Err(ParseHexError::TooLong); 173 return Err(ParseHexError::TooLong);
174 } 174 }
175 for (i, c) in value.bytes().enumerate() { 175 for (i, c) in value.bytes().enumerate() {