| 1 |
Description: Use alloc instead of std for garde strings |
| 2 |
Author: Simon Quigley <[email protected]> |
| 3 |
Origin: vendor |
| 4 |
Forwarded: not-needed |
| 5 |
Last-Update: 2026-08-22 |
| 6 |
--- |
| 7 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
| 8 |
--- a/src/features/garde.rs |
| 9 |
+++ b/src/features/garde.rs |
| 10 |
@@ -206,7 +206,7 @@ mod tests { |
| 11 |
#[garde(length(chars, min = 1, max = 100))] |
| 12 |
#[garde(length(min = 1, max = 100))] |
| 13 |
#[garde(length(utf16, min = 1, max = 100))] |
| 14 |
- value: std::string::String, |
| 15 |
+ value: alloc::string::String, |
| 16 |
} |
| 17 |
|
| 18 |
#[derive(garde::Validate)] |
| 19 |
@@ -223,7 +223,7 @@ mod tests { |
| 20 |
fn matches_string_behavior() { |
| 21 |
for s in &["hello", "héllo", "😀", "a", ""] { |
| 22 |
let string_result = StringTest { |
| 23 |
- value: std::string::String::from(*s), |
| 24 |
+ value: alloc::string::String::from(*s), |
| 25 |
} |
| 26 |
.validate(); |
| 27 |
let compact_result = CompactTest { |