Skip to content

Commit cb1c80f

Browse files
committed
fix build (#301)
1 parent f802a03 commit cb1c80f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

git-repository/src/config.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,16 @@ pub(crate) struct Cache {
3232
/// If true, multi-pack indices, whether present or not, may be used by the object database.
3333
pub use_multi_pack_index: bool,
3434
/// If true, we are on a case-insensitive file system.
35+
#[cfg_attr(not(feature = "git-index"), allow(dead_code))]
3536
pub ignore_case: bool,
3637
/// The path to the user-level excludes file to ignore certain files in the worktree.
38+
#[cfg_attr(not(feature = "git-index"), allow(dead_code))]
3739
pub excludes_file: Option<std::path::PathBuf>,
3840
/// Define how we can use values obtained with `xdg_config(…)` and its `XDG_CONFIG_HOME` variable.
41+
#[cfg_attr(not(feature = "git-index"), allow(dead_code))]
3942
xdg_config_home_env: EnvVarResourcePermission,
4043
/// Define how we can use values obtained with `xdg_config(…)`. and its `HOME` variable.
44+
#[cfg_attr(not(feature = "git-index"), allow(dead_code))]
4145
home_env: EnvVarResourcePermission,
4246
// TODO: make core.precomposeUnicode available as well.
4347
}
@@ -135,6 +139,7 @@ mod cache {
135139
}
136140

137141
/// Return a path by using the `$XDF_CONFIG_HOME` or `$HOME/.config/…` environment variables locations.
142+
#[cfg_attr(not(feature = "git-index"), allow(dead_code))]
138143
pub fn xdg_config_path(
139144
&self,
140145
resource_file_name: &str,

git-sec/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ impl Permission {
147147
/// Check this permissions and produce a reply to indicate if the `resource` can be used and in which way.
148148
///
149149
/// Only if this permission is set to `Allow` will the resource be usable.
150+
#[cfg(feature = "thiserror")]
150151
pub fn check<R: Debug>(&self, resource: R) -> Result<Option<R>, permission::Error<R, Self>> {
151152
match self {
152153
Permission::Allow => Ok(Some(resource)),

0 commit comments

Comments
 (0)