Skip to content

Commit

Permalink
fix clippy errros
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBatty committed Nov 15, 2023
1 parent 8a92e1d commit 186e2a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion forc-plugins/forc-doc/src/tests/expects/impl_trait/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn assert_file_tree(doc_dir_name: &str, project_name: &str, expected_files: Vec<
let doc_root = format!("{}/{}/out/{}", DATA_DIR, project_name, doc_dir_name).into();
let expected = expected_files
.iter()
.map(|path| PathBuf::from(path))
.map(PathBuf::from)
.collect::<HashSet<PathBuf>>();
let files = get_relative_file_paths_set(doc_root);
assert_eq!(files, expected);
Expand Down
8 changes: 4 additions & 4 deletions forc-plugins/forc-doc/src/tests/expects/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#![cfg(test)]
use crate::cli::Command;
use expect_test::Expect;
use std::path::PathBuf;
use std::path::{Path, PathBuf};

mod impl_trait;

pub(crate) fn check_file(doc_path: &PathBuf, path_to_file: &PathBuf, expect: &Expect) {
pub(crate) fn check_file(doc_path: &Path, path_to_file: &PathBuf, expect: &Expect) {
let path = doc_path.join(path_to_file);
let actual =
std::fs::read_to_string(path.clone()).expect(&format!("failed to read file: {:?}", path));
let actual = std::fs::read_to_string(path.clone())
.unwrap_or_else(|_| panic!("failed to read file: {:?}", path));
expect.assert_eq(&actual)
}

Expand Down

0 comments on commit 186e2a3

Please sign in to comment.