File: fix-application-feature.patch

package info (click to toggle)
rust-abscissa-core 0.8.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 420 kB
  • sloc: makefile: 4
file content (107 lines) | stat: -rw-r--r-- 3,572 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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
diff --git a/src/config.rs b/src/config.rs
index 4a952b5..cbccad8 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -16,7 +16,7 @@ use serde::de::DeserializeOwned;
 use std::{fmt::Debug, io::Read};
 
 /// Configuration reader.
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub type Reader<C> = std::sync::Arc<C>;
 
 /// Trait for Abscissa configuration data structures.
diff --git a/src/error/framework.rs b/src/error/framework.rs
index f686668..45083d8 100644
--- a/src/error/framework.rs
+++ b/src/error/framework.rs
@@ -42,7 +42,7 @@ impl std::error::Error for FrameworkError {
 #[derive(Clone, Debug, Eq, PartialEq)]
 pub enum FrameworkErrorKind {
     /// Errors relating to components
-    #[cfg(feature = "application")]
+    #[cfg(all(feature = "default", feature = "application"))]
     ComponentError,
 
     /// Error reading configuration file
@@ -79,7 +79,7 @@ impl FrameworkErrorKind {
     /// Get a message to display for this error
     pub fn msg(&self) -> &'static str {
         match self {
-            #[cfg(feature = "application")]
+            #[cfg(all(feature = "default", feature = "application"))]
             FrameworkErrorKind::ComponentError => "component error",
             FrameworkErrorKind::ConfigError => "config error",
             FrameworkErrorKind::IoError => "I/O operation failed",
diff --git a/src/lib.rs b/src/lib.rs
index 034a076..ef40cd9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -28,19 +28,19 @@ pub mod terminal;
 
 // Other modules
 
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub mod application;
 #[cfg(all(feature = "default", feature = "options"))]
 pub mod command;
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub mod component;
 #[cfg(all(feature = "default", feature = "config"))]
 pub mod config;
 pub mod path;
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub mod prelude;
 mod runnable;
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 mod shutdown;
 #[cfg(all(feature = "default", feature = "testing"))]
 pub mod testing;
@@ -56,7 +56,7 @@ pub use crate::{
 };
 pub use std::collections::{btree_map as map, btree_set as set, BTreeMap as Map};
 
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub use crate::{
     application::{boot, Application},
     component::Component,
@@ -78,5 +78,5 @@ pub use fs_err as fs;
 pub use secrecy as secret;
 #[cfg(feature = "secrets")]
 pub use secrecy::{SecretBox, SecretSlice, SecretString};
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub use semver::Version;
diff --git a/src/terminal.rs b/src/terminal.rs
index 8855dbb..ba3ad9c 100644
--- a/src/terminal.rs
+++ b/src/terminal.rs
@@ -1,6 +1,6 @@
 //! Terminal handling (TTY interactions, colors, etc)
 
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub mod component;
 #[macro_use]
 pub mod status;
diff --git a/src/trace.rs b/src/trace.rs
index 1cbb61e..5019715 100644
--- a/src/trace.rs
+++ b/src/trace.rs
@@ -1,9 +1,9 @@
 //! Tracing subsystem
 
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub mod component;
 mod config;
 
-#[cfg(feature = "application")]
+#[cfg(all(feature = "default", feature = "application"))]
 pub use self::component::Tracing;
 pub use self::config::Config;