Skip to content

Commit

Permalink
fix: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
assambar committed May 5, 2023
1 parent e870cc1 commit f243c34
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crates/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ impl Config {
for repo in &self.repositories {
for runtime in &repo.runtimes {
for ext in &runtime.extensions {
if check_runtime(project_root, &repo.name, runtime) && !extensions.contains(ext) {
if check_runtime(project_root, &repo.name, runtime) && !extensions.contains(ext)
{
extensions.push(ext.clone());
}
}
Expand Down
7 changes: 5 additions & 2 deletions crates/router/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ impl Files {
return include_pattern
.walk(&self.root)
.not(self.ignore_patterns.iter().map(|s| s.as_str()))
.expect("Failed to parse ignore patterns when processing files in the current directory")
.map(|e| e.unwrap()).collect();
.expect(
"Failed to parse ignore patterns when processing files in the current directory",
)
.map(|e| e.unwrap())
.collect();
}

fn construct_include_pattern(file_extensions: Vec<String>) -> String {
Expand Down
7 changes: 6 additions & 1 deletion crates/router/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ impl Routes {
/// Initialize the list of routes from the given folder. This method will look for
/// different files and will create the associated routes. This routing approach
/// is pretty popular in web development and static sites.
pub fn new(path: &Path, base_prefix: &str, ignore_patterns: Vec<String>, config: &Config) -> Self {
pub fn new(
path: &Path,
base_prefix: &str,
ignore_patterns: Vec<String>,
config: &Config,
) -> Self {
let mut routes = Vec::new();
let prefix = Self::format_prefix(base_prefix);
let runtime_extensions = config.get_runtime_extensions(path);
Expand Down

0 comments on commit f243c34

Please sign in to comment.