aboutsummaryrefslogtreecommitdiffstats
path: root/gitolfs3-common/src
diff options
context:
space:
mode:
authorRutger Broekhoff2025-04-08 22:56:40 +0200
committerRutger Broekhoff2025-04-08 22:56:40 +0200
commit294d634601bdd71f056101c64e00d7a5a7fc5ae2 (patch)
treea9b24201cc1ed44d9a470a03a2a9066bc98cb83f /gitolfs3-common/src
parent4a26f611b697907110459631da4d4a0f049440f9 (diff)
downloadgitolfs3-main.tar.gz
gitolfs3-main.zip
Switch to Rust 2024, update dependenciesHEADmain
Diffstat (limited to 'gitolfs3-common/src')
-rw-r--r--gitolfs3-common/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
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() {