diff options
author | 2025-04-08 22:56:40 +0200 | |
---|---|---|
committer | 2025-04-08 22:56:40 +0200 | |
commit | 294d634601bdd71f056101c64e00d7a5a7fc5ae2 (patch) | |
tree | a9b24201cc1ed44d9a470a03a2a9066bc98cb83f /gitolfs3-common | |
parent | 4a26f611b697907110459631da4d4a0f049440f9 (diff) | |
download | gitolfs3-294d634601bdd71f056101c64e00d7a5a7fc5ae2.tar.gz gitolfs3-294d634601bdd71f056101c64e00d7a5a7fc5ae2.zip |
Switch to Rust 2024, update dependencies
Diffstat (limited to 'gitolfs3-common')
-rw-r--r-- | gitolfs3-common/Cargo.toml | 4 | ||||
-rw-r--r-- | gitolfs3-common/src/lib.rs | 8 |
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] |
2 | name = "gitolfs3-common" | 2 | name = "gitolfs3-common" |
3 | version = "0.1.0" | 3 | version = "0.1.0" |
4 | edition = "2021" | 4 | edition = "2024" |
5 | license = "MIT" | 5 | license = "MIT" |
6 | 6 | ||
7 | [dependencies] | 7 | [dependencies] |
8 | chrono = "0.4" | 8 | chrono = "0.4" |
9 | hmac-sha256 = "1.1" | 9 | hmac-sha256 = "1.1" |
10 | subtle = "2.5" | 10 | subtle = "2.6" |
11 | serde = { version = "1", features = ["derive"] } | 11 | serde = { 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 @@ | |||
1 | use chrono::{DateTime, Utc}; | 1 | use chrono::{DateTime, Utc}; |
2 | use serde::{de, Deserialize, Serialize}; | 2 | use serde::{Deserialize, Serialize, de}; |
3 | use std::{ | 3 | use 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 | ||
165 | fn parse_hex_exact(value: &str, buf: &mut [u8]) -> Result<(), ParseHexError> { | 165 | fn 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() { |