unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 24d569257361cb6de79a0f67251df31afd1d447c 2461 bytes (raw)
name: gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 
From f940d8c8fa087554583158d50df071af89c516db Mon Sep 17 00:00:00 2001
From: Simon Lamon <32477463+silamon@users.noreply.github.com>
Date: Sat, 19 Nov 2022 20:32:07 +0100
Subject: [PATCH] chore: upgrade dependencies (#9)

Co-authored-by: Markus Siemens <markus@m-siemens.de>
---
 Cargo.toml.orig | 8 ++++----
 src/errors.rs   | 6 +++---
 src/reader.rs   | 2 +-
 src/utils.rs    | 5 ++---
 4 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 9afddd0..e302436 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -14,15 +14,15 @@ categories = ["parser-implementations"]
 backtrace = []
 
 [dependencies]
-bytes = "0.5"
+bytes = "1.2.0"
 encoding_rs = "0.8.31"
 enum-primitive-derive = "0.2.2"
-itertools = "0.9.0"
+itertools = "0.10.3"
 num-traits = "0.2"
 paste = "1.0"
 thiserror = "1.0"
-uuid = "0.8"
-widestring = "0.4.3"
+uuid = "1.1.2"
+widestring = "1.0.2"
 
 [dev-dependencies]
 insta = "1.21.1"
diff --git a/src/errors.rs b/src/errors.rs
index 91477b3..50079a3 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -51,8 +51,8 @@ impl From<std::string::FromUtf16Error> for Error {
     }
 }
 
-impl From<widestring::MissingNulError<u16>> for Error {
-    fn from(err: widestring::MissingNulError<u16>) -> Self {
+impl From<widestring::error::MissingNulTerminator> for Error {
+    fn from(err: widestring::error::MissingNulTerminator) -> Self {
         ErrorKind::from(err).into()
     }
 }
@@ -128,6 +128,6 @@ pub enum ErrorKind {
     #[error("UTF-16 string is missing null terminator: {err}")]
     Utf16MissingNull {
         #[from]
-        err: widestring::MissingNulError<u16>,
+        err: widestring::error::MissingNulTerminator,
     },
 }
diff --git a/src/reader.rs b/src/reader.rs
index 64730d0..318c280 100644
--- a/src/reader.rs
+++ b/src/reader.rs
@@ -40,7 +40,7 @@ impl<'a> Reader<'a> {
     }
 
     pub(crate) fn bytes(&self) -> &[u8] {
-        self.0.bytes()
+        self.0.chunk()
     }
 
     pub(crate) fn remaining(&self) -> usize {
diff --git a/src/utils.rs b/src/utils.rs
index fd77181..074ff50 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -12,8 +12,7 @@ impl Utf16ToString for &[u8] {
             .map(|v| u16::from_le_bytes([v[0], v[1]]))
             .collect();
 
-        let value = U16CString::from_vec_with_nul(data)?;
-
-        Ok(value.to_string()?)
+        let value = U16CString::from_vec_truncate(data);
+        Ok(value.to_string().unwrap())
     }
 }

debug log:

solving 24d5692573 ...
found 24d5692573 in https://yhetil.org/guix-patches/20241105231519.22378-4-ngraves@ngraves.fr/ ||
	https://yhetil.org/guix-patches/20241103013258.26141-5-ngraves@ngraves.fr/

applying [1/1] https://yhetil.org/guix-patches/20241105231519.22378-4-ngraves@ngraves.fr/
diff --git a/gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch b/gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch
new file mode 100644
index 0000000000..24d5692573

1:26: trailing whitespace.
 
1:41: trailing whitespace.
 
1:51: trailing whitespace.
 
1:73: trailing whitespace.
 
1:78: trailing whitespace.
 
Checking patch gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch...
Applied patch gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/20241103013258.26141-5-ngraves@ngraves.fr/ for 24d5692573
index at:
100644 24d569257361cb6de79a0f67251df31afd1d447c	gnu/packages/patches/rust-onenote-parser-for-clamav-deps.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).