File: fix-tests-no-default-features.patch

package info (click to toggle)
rust-chrono-tz 0.6.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,012 kB
  • sloc: ansic: 7,056; awk: 692; makefile: 619; sh: 464; perl: 34
file content (35 lines) | stat: -rw-r--r-- 910 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
Index: chrono-tz/src/lib.rs
===================================================================
--- chrono-tz.orig/src/lib.rs
+++ chrono-tz/src/lib.rs
@@ -176,6 +176,10 @@ pub use timezones::Tz;
 pub use timezones::TZ_VARIANTS;
 
 #[cfg(test)]
+#[macro_use]
+extern crate alloc;
+
+#[cfg(test)]
 mod tests {
     use super::America::Danmarkshavn;
     use super::Asia::Dhaka;
@@ -192,6 +196,7 @@ mod tests {
     use super::Tz;
     use super::US::Eastern;
     use super::UTC;
+    use alloc::string::ToString;
     use chrono::{Duration, TimeZone};
 
     #[test]
Index: chrono-tz/src/serde.rs
===================================================================
--- chrono-tz.orig/src/serde.rs
+++ chrono-tz/src/serde.rs
@@ -46,6 +46,7 @@ mod tests {
     }
 
     #[test]
+    #[cfg(feature = "std")]
     fn serde_de_error() {
         assert_de_tokens_error::<Tz>(
             &[Token::Str("Europe/L")],