mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-27 13:00:57 +00:00
Fix new clippy warnings
This commit is contained in:
parent
98ad5d5b3f
commit
1014b975cd
@ -18,14 +18,14 @@ fn ui() {
|
||||
};
|
||||
|
||||
let target_crate_root = manifest_dir.join("../target/tests/trybuild/askama_testing");
|
||||
if !target_crate_root.exists() {
|
||||
if let Err(err) = std::fs::create_dir_all(&target_crate_root) {
|
||||
if !target_crate_root.exists()
|
||||
&& let Err(err) = std::fs::create_dir_all(&target_crate_root)
|
||||
{
|
||||
panic!(
|
||||
"failed to create folder `{}`: {err:?}",
|
||||
target_crate_root.display()
|
||||
);
|
||||
}
|
||||
}
|
||||
let target_crate_root = target_crate_root.canonicalize().unwrap();
|
||||
|
||||
let symlink = |name: &str| {
|
||||
@ -46,10 +46,10 @@ fn ui() {
|
||||
|
||||
// soft-link toml configs
|
||||
for entry in manifest_dir.read_dir().unwrap().filter_map(Result::ok) {
|
||||
if let Some(name) = entry.file_name().to_str() {
|
||||
if name != "Cargo.toml" || !name.ends_with(".toml") {
|
||||
if let Some(name) = entry.file_name().to_str()
|
||||
&& (name != "Cargo.toml" || !name.ends_with(".toml"))
|
||||
{
|
||||
symlink(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user