From 294d634601bdd71f056101c64e00d7a5a7fc5ae2 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Tue, 8 Apr 2025 22:56:40 +0200 Subject: Switch to Rust 2024, update dependencies --- gitolfs3-common/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gitolfs3-common/src') 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 @@ use chrono::{DateTime, Utc}; -use serde::{de, Deserialize, Serialize}; +use serde::{Deserialize, Serialize, de}; use std::{ fmt::{self, Write}, ops, @@ -163,13 +163,13 @@ impl fmt::Display for ReadHexError { } fn parse_hex_exact(value: &str, buf: &mut [u8]) -> Result<(), ParseHexError> { - if value.bytes().len() % 2 == 1 { + if value.len() % 2 == 1 { return Err(ParseHexError::UnevenNibbles); } - if value.bytes().len() < 2 * buf.len() { + if value.len() < 2 * buf.len() { return Err(ParseHexError::TooShort); } - if value.bytes().len() > 2 * buf.len() { + if value.len() > 2 * buf.len() { return Err(ParseHexError::TooLong); } for (i, c) in value.bytes().enumerate() { -- cgit v1.2.3