Skip to content

Commit c8c39bb

Browse files
committed
fix: Prefix all unused variables with underscore and disable -D warnings in binary builds
1 parent eb16475 commit c8c39bb

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jobs:
8080
sudo apt-get install -y gcc-aarch64-linux-gnu musl-tools
8181
8282
- name: Build binary
83+
env:
84+
RUSTFLAGS: ""
8385
run: cargo build --release --target ${{ matrix.target }} --verbose
8486

8587
- name: Prepare binary (Unix)

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/collections/document/loader/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub fn load_collections(config: &Config) -> BoxResult<HashMap<String, Collection
5555
}
5656

5757
// Load documents for each collection
58-
for (label, collection) in &mut collections {
58+
for (_label, collection) in &mut collections {
5959
load_collection_documents(collection, config)?;
6060
}
6161

src/directory/structure/directory_structure.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ impl DirectoryStructure {
3434
pub fn from_config(config: &Config) -> Self {
3535
// Create source-relative path builders for common directories
3636
let source = &config.source;
37-
let destination = &config.destination;
38-
37+
let _destination = &config.destination;
38+
3939
// Create structure with paths relative to source
40-
let layouts_dir = source.join(&config.layouts_dir);
41-
let includes_dir = source.join(&config.includes_dir);
40+
let _layouts_dir = source.join(&config.layouts_dir);
41+
let _includes_dir = source.join(&config.includes_dir);
4242
let posts_dir = source.join(&config.posts_dir);
4343
let drafts_dir = source.join(&config.drafts_dir);
44-
let data_dir = source.join(&config.data_dir);
44+
let _data_dir = source.join(&config.data_dir);
4545

4646
// Default directory names for sass and plugins
4747
let sass_dir = source.join("_sass");

src/markdown/renderer/markdown_renderer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl<'a> MarkdownRenderer<'a> {
168168
pub fn generate_toc(&self, html: &str) -> String {
169169
let headings = extract_headings(html);
170170
match headings {
171-
Ok(h) => {
171+
Ok(_h) => {
172172
// In the future, use TocOptions here
173173
match generate_toc(html) {
174174
Ok(toc) => toc,

src/markdown/renderer/syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl SyntaxHighlighter {
6262
/// Highlight a specific code block with specified language
6363
pub fn highlight_code(&self, code: &str, lang: &str) -> String {
6464
// Get the theme
65-
let theme = self.theme_set.themes.get(&self.current_theme).unwrap_or_else(|| {
65+
let _theme = self.theme_set.themes.get(&self.current_theme).unwrap_or_else(|| {
6666
// Fallback to default theme
6767
self.theme_set.themes.get("InspiredGitHub").unwrap()
6868
});

src/markdown/toc/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ impl TocHeading {
3131
}
3232

3333
/// Render this heading and its children as HTML
34-
pub fn to_html(&self, current_level: usize) -> String {
34+
pub fn to_html(&self, _current_level: usize) -> String {
3535
let mut html = String::new();
3636

3737
// Add the current heading as a list item with link
@@ -296,7 +296,7 @@ impl Default for TocOptions {
296296
}
297297

298298
/// Generate TOC with custom options
299-
pub fn generate_toc_with_options(html: &str, options: &TocOptions) -> BoxResult<String> {
299+
pub fn generate_toc_with_options(_html: &str, _options: &TocOptions) -> BoxResult<String> {
300300
// Temporarily return empty string due to compilation issues
301301
Ok(String::new())
302302
}

0 commit comments

Comments
 (0)