File: src-fix-tests-with-recent-rustc.patch

package info (click to toggle)
rust-glib-0.18 0.18.5-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,156 kB
  • sloc: makefile: 17
file content (51 lines) | stat: -rw-r--r-- 2,045 bytes parent folder | download
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
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Tue, 24 Sep 2024 17:16:55 +0200
Subject: src: fix tests with recent rustc

Forwarded: not-needed
---
 src/collections/strv.rs | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/src/collections/strv.rs b/src/collections/strv.rs
index 85b288e..4573251 100644
--- a/src/collections/strv.rs
+++ b/src/collections/strv.rs
@@ -1479,21 +1479,18 @@ mod test {
         let items = ["str1", "str2", "str3", "str4"];
 
         items[..].run_with_strv(|s| unsafe {
-            assert!(s.get_unchecked(4).is_null());
             assert_eq!(s.len(), items.len());
             let s = StrV::from_glib_borrow(s.as_ptr() as *const *const c_char);
             assert_eq!(s, items);
         });
 
         Vec::from(&items[..]).run_with_strv(|s| unsafe {
-            assert!(s.get_unchecked(4).is_null());
             assert_eq!(s.len(), items.len());
             let s = StrV::from_glib_borrow(s.as_ptr() as *const *const c_char);
             assert_eq!(s, items);
         });
 
         StrV::from(&items[..]).run_with_strv(|s| unsafe {
-            assert!(s.get_unchecked(4).is_null());
             assert_eq!(s.len(), items.len());
             let s = StrV::from_glib_borrow(s.as_ptr() as *const *const c_char);
             assert_eq!(s, items);
@@ -1501,7 +1498,6 @@ mod test {
 
         let v = items.iter().copied().map(String::from).collect::<Vec<_>>();
         items.run_with_strv(|s| unsafe {
-            assert!(s.get_unchecked(4).is_null());
             assert_eq!(s.len(), v.len());
             let s = StrV::from_glib_borrow(s.as_ptr() as *const *const c_char);
             assert_eq!(s, items);
@@ -1509,7 +1505,6 @@ mod test {
 
         let v = items.iter().copied().map(GString::from).collect::<Vec<_>>();
         items.run_with_strv(|s| unsafe {
-            assert!(s.get_unchecked(4).is_null());
             assert_eq!(s.len(), v.len());
             let s = StrV::from_glib_borrow(s.as_ptr() as *const *const c_char);
             assert_eq!(s, items);