docs: new jekyll template #15
Clippy (Stable ~ macOS/ARM64)
Clippy failed.
Details
Running cargo clippy
took roughly ~5716ms to complete
- Working Directory: repository directory
Annotations
Check failure on line 14 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L14
constants have by default a `'static` lifetime
Raw output
error: constants have by default a `'static` lifetime
--> src/util/file_type.rs:14:33
|
14 | const JEKYLL_CONFIG_FILE_NAME: &'static str = "_config.yml";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_static_lifetimes)]`
Check failure on line 1 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L1
module has the same name as its containing module
Raw output
error: module has the same name as its containing module
--> src/documentor/mod.rs:1:1
|
1 | mod documentor;
| ^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `-D clippy::module-inception` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::module_inception)]`
Check failure on line 45 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L45
doc list item without indentation
Raw output
error: doc list item without indentation
--> src/documentor/documentor.rs:45:9
|
45 | /// documentor will document, if any.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
= note: `-D clippy::doc-lazy-continuation` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
|
45 | /// documentor will document, if any.
| ++
Check failure on line 48 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L48
doc list item without indentation
Raw output
error: doc list item without indentation
--> src/documentor/documentor.rs:48:9
|
48 | /// documentor will document.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
48 | /// documentor will document.
| ++
Check failure on line 51 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L51
doc list item without indentation
Raw output
error: doc list item without indentation
--> src/documentor/documentor.rs:51:9
|
51 | /// documentor will document.
| ^
|
= help: if this is supposed to be its own paragraph, add a blank line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
|
51 | /// documentor will document.
| ++
Check failure on line 78 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L78
called `.as_ref().map(|f| f.as_path())` on an `Option` value
Raw output
error: called `.as_ref().map(|f| f.as_path())` on an `Option` value
--> src/documentor/markdown/jekyll_markdown_documentor.rs:78:9
|
78 | self.file_name.as_ref().map(|f| f.as_path())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.file_name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
= note: `-D clippy::option-as-ref-deref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::option_as_ref_deref)]`
Check failure on line 44 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L44
called `.as_ref().map(|f| f.as_path())` on an `Option` value
Raw output
error: called `.as_ref().map(|f| f.as_path())` on an `Option` value
--> src/documentor/markdown/markdown_documentor.rs:44:9
|
44 | self.file_name.as_ref().map(|f| f.as_path())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.file_name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
Check failure on line 71 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L71
called `.as_ref().map(|f| f.as_path())` on an `Option` value
Raw output
error: called `.as_ref().map(|f| f.as_path())` on an `Option` value
--> src/documentor/owl/class_documentor.rs:71:9
|
71 | self.file_name.as_ref().map(|f| f.as_path())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.file_name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
Check failure on line 77 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L77
called `.as_ref().map(|f| f.as_path())` on an `Option` value
Raw output
error: called `.as_ref().map(|f| f.as_path())` on an `Option` value
--> src/documentor/owl/ontology_documentor.rs:77:9
|
77 | self.file_name.as_ref().map(|f| f.as_path())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using as_deref: `self.file_name.as_deref()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_deref
Check failure on line 1 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L1
module has the same name as its containing module
Raw output
error: module has the same name as its containing module
--> src/generator/mod.rs:1:1
|
1 | mod generator;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
Check failure on line 68 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L68
this expression creates a reference which is immediately dereferenced by the compiler
Raw output
error: this expression creates a reference which is immediately dereferenced by the compiler
--> src/generator/generator.rs:68:25
|
68 | &source,
| ^^^^^^^ help: change this to: `source`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`
Check failure on line 33 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L33
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
Raw output
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/loader/impl/markdown.rs:33:24
|
33 | file_names.into_iter().map(|file_name| {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::into_iter_on_ref)]`
Check failure on line 48 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L48
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
Raw output
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/loader/impl/rdf.rs:48:24
|
48 | file_names.into_iter().map(|file_name| {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check failure on line 2 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L2
module has the same name as its containing module
Raw output
error: module has the same name as its containing module
--> src/loader/mod.rs:2:1
|
2 | mod loader;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
Check failure on line 47 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L47
writing `&Vec` instead of `&[_]` involves a new object where a slice will do
Raw output
error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/loader/loader.rs:47:21
|
47 | file_names: &Vec<&PathBuf>,
| ^^^^^^^^^^^^^^ help: change this to: `&'life2 [&PathBuf]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `-D clippy::ptr-arg` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`
Check failure on line 66 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L66
the following explicit lifetimes could be elided: 'a
Raw output
error: the following explicit lifetimes could be elided: 'a
--> src/source/impl/file_system_source.rs:66:29
|
66 | pub async fn scan_files<'a>(
| ^^
67 | types: FileTypeSlice<'a>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `-D clippy::needless-lifetimes` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
Check failure on line 151 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L151
redundant closure
Raw output
error: redundant closure
--> src/util/file_type.rs:151:30
|
151 | self.file_name().map(|name| Path::new(name))
| ^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Path::new`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-D clippy::redundant-closure` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`
Check failure on line 185 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L185
the following explicit lifetimes could be elided: 'a
Raw output
error: the following explicit lifetimes could be elided: 'a
--> src/util/file_type.rs:185:34
|
185 | pub fn is_matching_file_type<'a>(
| ^^
186 | path: &Path,
187 | types: FileTypeSlice<'a>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
185 ~ pub fn is_matching_file_type(
186 | path: &Path,
187 ~ types: FileTypeSlice<'_>,
|
Check failure on line 203 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L203
using `clone` on type `FileType` which implements the `Copy` trait
Raw output
error: using `clone` on type `FileType` which implements the `Copy` trait
--> src/util/file_type.rs:203:31
|
203 | types.iter().map(|&t| t.clone()).collect()
| ^^^^^^^^^ help: try dereferencing it: `*t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `-D clippy::clone-on-copy` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::clone_on_copy)]`
Check failure on line 206 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L206
the following explicit lifetimes could be elided: 'a
Raw output
error: the following explicit lifetimes could be elided: 'a
--> src/util/file_type.rs:206:37
|
206 | pub fn create_vec_of_references<'a>(
| ^^
207 | types_vec: &'a Vec<FileType>,
| ^^
208 | ) -> Vec<&'a FileType> {
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
206 ~ pub fn create_vec_of_references(
207 ~ types_vec: &Vec<FileType>,
208 ~ ) -> Vec<&FileType> {
|
Check failure on line 209 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L209
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
Raw output
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec`
--> src/util/file_type.rs:209:19
|
209 | types_vec.into_iter().collect()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
Check failure on line 9 in /Users/runner/work/grapharch/grapharch/src/lib.rs
github-actions / Clippy: Rust Stable 1.85.0-nightly (14ee63a3c 2024-12-29) in
/Users/runner/work/grapharch/grapharch/src/lib.rs#L9
accessing first element with `files.get(0)`
Raw output
error: accessing first element with `files.get(0)`
--> src/util/paths.rs:9:17
|
9 | let first = files.get(0)?;
| ^^^^^^^^^^^^ help: try: `files.first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `-D clippy::get-first` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::get_first)]`