Skip to content

Commit 283ee3b

Browse files
authored
fix compilation with no default features (#63)
Fix #62
1 parent 42a31ae commit 283ee3b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

bacon.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ default_job = "check-all"
99
command = ["cargo", "check", "--color", "always"]
1010
need_stdout = false
1111

12+
[jobs.check-no-features]
13+
command = ["cargo", "check", "--no-default-features", "--color", "always"]
14+
need_stdout = false
15+
1216
[jobs.check-all]
1317
command = ["cargo", "check", "--all-targets", "--color", "always"]
1418
need_stdout = false

src/skin.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use {
2424
MAX_HEADER_DEPTH,
2525
},
2626
std::{
27-
collections::HashMap,
2827
fmt,
2928
io::Write,
3029
},
@@ -57,7 +56,7 @@ pub struct MadSkin {
5756
/// (comments welcome)
5857
/// Do not use compounds with a length different than 1.
5958
#[cfg(feature = "special-renders")]
60-
pub special_chars: HashMap<Compound<'static>, StyledChar>,
59+
pub special_chars: std::collections::HashMap<Compound<'static>, StyledChar>,
6160

6261
}
6362

@@ -92,7 +91,7 @@ impl Default for MadSkin {
9291
list_items_indentation_mode: Default::default(),
9392

9493
#[cfg(feature = "special-renders")]
95-
special_chars: HashMap::new(),
94+
special_chars: std::collections::HashMap::new(),
9695
};
9796
skin.code_block.set_fgbg(gray(17), gray(3));
9897
for h in &mut skin.headers {
@@ -128,7 +127,7 @@ impl MadSkin {
128127
ellipsis: CompoundStyle::default(),
129128
list_items_indentation_mode: Default::default(),
130129
#[cfg(feature = "special-renders")]
131-
special_chars: HashMap::new(),
130+
special_chars: std::collections::HashMap::new(),
132131
table_border_chars: STANDARD_TABLE_BORDER_CHARS,
133132
}
134133
}
@@ -562,7 +561,7 @@ impl MadSkin {
562561
}
563562
}
564563
#[cfg(not(feature = "special-renders"))]
565-
for c in &fc.composite.compounds {
564+
for c in &fc.compounds {
566565
let os = self.compound_style(ls, c);
567566
write!(f, "{}", os.apply_to(c.as_str()))?;
568567
}

0 commit comments

Comments
 (0)