File: 1002-tests-Use-usize-MAX-instead-of-64-bit-literal.patch

package info (click to toggle)
rust-x509-parser 0.17.0-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 720 kB
  • sloc: python: 29; makefile: 2; sh: 1
file content (18 lines) | stat: -rw-r--r-- 611 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: tests: Use usize::MAX instead of 64 bit literal
 On 32 bit systems, the 64 bit value does not fit into the literal.
Author: Bastian Germann <bage@debian.org>
Forwarded: no
Last-Update: 2025-05-16
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/tests/test01.rs
+++ b/tests/test01.rs
@@ -8,7 +8,7 @@ fn test01() {
 
 fn parser02(input: &[u8]) -> nom::IResult<&[u8], ()> {
     let (_hdr, input) = take(1_usize)(input)?;
-    let (_data, input) = take(18_446_744_073_709_551_615_usize)(input)?;
+    let (_data, input) = take(usize::MAX)(input)?;
     Ok((input, ()))
 }