Skip to content

Commit f508877

Browse files
committed
Update to rustfmt style edition 2024
1 parent 8ca79a9 commit f508877

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

.rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_code_in_doc_comments = true
22
imports_granularity = "Crate"
33
newline_style = "Unix"
4+
single_line_if_else_max_width = 50
45
use_field_init_shorthand = true
56
use_small_heuristics = "Max"
67
wrap_comments = true
7-
style_edition = "2021"

components/core/src/build/output_dir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
sync::{Mutex, RwLock},
44
};
55

6-
use anyhow::{bail, Context as _};
6+
use anyhow::{Context as _, bail};
77
use camino::{Utf8Path, Utf8PathBuf};
88
use fs_err as fs;
99

components/core/src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use camino::{Utf8Path, Utf8PathBuf};
22
use globset::{Glob, GlobSet, GlobSetBuilder};
3-
use indexmap::{indexmap, IndexMap};
4-
use serde::{de, Deserialize, Deserializer};
3+
use indexmap::{IndexMap, indexmap};
4+
use serde::{Deserialize, Deserializer, de};
55

66
use crate::content::{ContentFileConfig, ProcessContent};
77

components/core/src/content.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use std::{
22
collections::BTreeMap,
33
io::{self, BufReader, BufWriter, Read, Seek, Write},
44
sync::{
5-
atomic::{AtomicBool, Ordering},
65
Arc, OnceLock,
6+
atomic::{AtomicBool, Ordering},
77
},
88
};
99

@@ -25,8 +25,8 @@ use crate::{
2525
frontmatter::parse_frontmatter,
2626
metadata::metadata_env,
2727
template::context::{
28-
serialize_hinoki_cx, DirectoryContext, GlobalContext, HinokiContext, RenderContext,
29-
TemplateContext,
28+
DirectoryContext, GlobalContext, HinokiContext, RenderContext, TemplateContext,
29+
serialize_hinoki_cx,
3030
},
3131
util::HinokiDatetime,
3232
};

components/core/src/content/file_config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use camino::Utf8PathBuf;
2-
use indexmap::{map::Entry as IndexMapEntry, IndexMap};
2+
use indexmap::{IndexMap, map::Entry as IndexMapEntry};
33
use serde::Deserialize;
44
use toml::map::Entry as TomlMapEntry;
55

components/core/src/content/markdown.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use pulldown_cmark::{html::push_html, Options, Parser};
1+
use pulldown_cmark::{Options, Parser, html::push_html};
22

33
use crate::template::context::HinokiContext;
44

components/core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::io;
22

3-
use anyhow::{anyhow, Context as _};
3+
use anyhow::{Context as _, anyhow};
44
use camino::Utf8Path;
55
use fs_err as fs;
66
use tracing::warn;

components/core/src/template.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::mpsc;
22

3-
use anyhow::{format_err, Context as _};
3+
use anyhow::{Context as _, format_err};
44
use bumpalo_herd::Herd;
55
use camino::Utf8Path;
66
use fs_err::{self as fs};

components/core/src/template/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ use std::{
77

88
use camino::Utf8PathBuf;
99
use serde::{
10-
de::{self, IntoDeserializer as _},
1110
Deserialize, Serialize, Serializer,
11+
de::{self, IntoDeserializer as _},
1212
};
1313
use tracing::warn;
1414

1515
#[cfg(feature = "syntax-highlighting")]
1616
use crate::content::{LazySyntaxHighlighter, SyntaxHighlighter};
1717
use crate::{
18+
Config,
1819
content::{DirectoryMetadata, FileMetadata},
1920
util::OrderBiMap,
20-
Config,
2121
};
2222

2323
#[derive(Clone)]

components/core/src/template/functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fmt::Display;
55

66
use camino::Utf8PathBuf;
77
use fs_err as fs;
8-
use minijinja::{value::Kwargs, ErrorKind, Value};
8+
use minijinja::{ErrorKind, Value, value::Kwargs};
99

1010
use super::context::{HinokiContext, MinijinjaStateExt, Ordering};
1111

0 commit comments

Comments
 (0)