Skip to content

Commit 745313d

Browse files
committed
clippy, bump version
1 parent 6b73be5 commit 745313d

File tree

6 files changed

+8
-34
lines changed

6 files changed

+8
-34
lines changed

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.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flash"
3-
version = "0.2.13"
3+
version = "0.3.0"
44
edition = "2021"
55
authors = ["HJfod", "matcool"]
66
description = "Documentation generator for C++"

src/builder/comment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ impl<'e> JSDocComment<'e> {
626626
.map(|d| {
627627
fmt_markdown(
628628
self.builder,
629-
&fmt_autolinks(self.builder, d, None),
629+
&fmt_autolinks(self.builder, d),
630630
None::<fn(_) -> _>,
631631
)
632632
})

src/builder/shared.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ fn fmt_autolinks_recursive(
549549
entity: &CppItem,
550550
config: Arc<Config>,
551551
annotations: &mut Annotations<'_>,
552-
prefix: &Option<char>,
553552
) {
554553
annotations.rewind();
555554
while let Some(word) = annotations.next() {
@@ -564,15 +563,15 @@ fn fmt_autolinks_recursive(
564563

565564
if let CppItem::Namespace(ns) = entity {
566565
for v in ns.entries.values() {
567-
fmt_autolinks_recursive(v, config.clone(), annotations, prefix);
566+
fmt_autolinks_recursive(v, config.clone(), annotations);
568567
}
569568
}
570569
}
571570

572-
pub fn fmt_autolinks(builder: &Builder, text: &str, prefix: Option<char>) -> String {
571+
pub fn fmt_autolinks(builder: &Builder, text: &str) -> String {
573572
let mut annotations = Annotations::new(text);
574573
for entry in builder.root.entries.values() {
575-
fmt_autolinks_recursive(entry, builder.config.clone(), &mut annotations, &prefix);
574+
fmt_autolinks_recursive(entry, builder.config.clone(), &mut annotations);
576575
}
577576
annotations.into_result()
578577
}

src/builder/traits.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use crate::{
1111
url::UrlPath,
1212
};
1313

14-
use super::{builder::Builder, namespace::CppItemKind, shared::member_fun_link};
14+
use super::{builder::Builder, namespace::CppItemKind};
1515

1616
pub trait EntityMethods<'e> {
1717
/// Get the config source for this entity
@@ -267,8 +267,6 @@ impl<'e> EntityMethods<'e> for Entity<'e> {
267267
#[derive(Clone)]
268268
pub struct SubItem {
269269
pub title: String,
270-
pub heading: String,
271-
pub icon: Option<(String, bool)>,
272270
}
273271

274272
impl SubItem {
@@ -283,8 +281,6 @@ impl SubItem {
283281
.filter_map(|e| {
284282
Some(SubItem {
285283
title: e.get_name()?,
286-
heading: member_fun_link(&e)?,
287-
icon: Some((String::from("code"), true)),
288284
})
289285
})
290286
.collect(),

src/main.rs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@
55
use crate::{analyze::create_docs, normalize::Normalize, url::UrlPath};
66
use clap::Parser;
77
use config::Config;
8-
use std::{
9-
error::Error,
10-
fs, io,
11-
path::{Path, PathBuf},
12-
process::exit,
13-
time::Instant,
14-
};
8+
use std::{error::Error, fs, path::PathBuf, process::exit, time::Instant};
159

1610
mod analyze;
1711
mod annotation;
@@ -43,21 +37,6 @@ struct Args {
4337
skip_build: bool,
4438
}
4539

46-
fn remove_dir_contents<P: AsRef<Path>>(path: P) -> io::Result<()> {
47-
for entry in fs::read_dir(path)? {
48-
let entry = entry?;
49-
let path = entry.path();
50-
51-
if entry.file_type()?.is_dir() {
52-
remove_dir_contents(&path)?;
53-
fs::remove_dir(path)?;
54-
} else {
55-
fs::remove_file(path)?;
56-
}
57-
}
58-
Ok(())
59-
}
60-
6140
#[tokio::main]
6241
async fn main() -> Result<(), Box<dyn Error>> {
6342
let args = Args::parse();

0 commit comments

Comments
 (0)