Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislearn committed Nov 29, 2023
1 parent f97fb0e commit c2916e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/oapi-macros/src/schema/flattened_map_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub(crate) struct FlattenedMapSchema {
tokens: TokenStream,
}

impl<'c> FlattenedMapSchema {
impl FlattenedMapSchema {
pub(crate) fn new(
ComponentSchemaProps {
type_tree,
Expand Down
3 changes: 2 additions & 1 deletion crates/serve-static/src/dir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ pub struct StaticDir {
pub chunk_size: Option<u64>,
/// List dot files.
pub include_dot_files: bool,
#[allow(clippy::type_complexity)]
exclude_filters: Vec<Box<dyn Fn(&str) -> bool + Send + Sync>>,
/// Auto list the directory if default file not found.
pub auto_list: bool,
Expand Down Expand Up @@ -421,7 +422,7 @@ impl Handler for StaticDir {
if let Ok(mut entries) = tokio::fs::read_dir(&abs_path).await {
while let Ok(Some(entry)) = entries.next_entry().await {
let file_name = entry.file_name().to_string_lossy().to_string();
if self.include_dot_files || (!self.include_dot_files && !file_name.starts_with('.')) {
if self.include_dot_files || !file_name.starts_with('.') {
if let Ok(metadata) = entry.metadata().await {
if metadata.is_dir() {
dirs.entry(file_name).or_insert(metadata);
Expand Down

0 comments on commit c2916e8

Please sign in to comment.