mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor filename handling in ApiService to streamline slugification logic
- Updated the mapping of entries to directly return lowercase slugified names, improving clarity and efficiency. - Enhanced test stability by adding a conditional ignore for flaky tests on macOS related to rapid rename and write operations.
This commit is contained in:
parent
72b1d8d42e
commit
f037ec3b7c
2 changed files with 7 additions and 3 deletions
|
|
@ -2135,13 +2135,13 @@ impl ApiService {
|
|||
.map(|entries| {
|
||||
entries
|
||||
.flatten()
|
||||
.filter_map(|e| {
|
||||
.map(|e| {
|
||||
let name = e.file_name();
|
||||
let name_str = name.to_string_lossy();
|
||||
if e.path().is_dir() {
|
||||
Some(name_str.to_lowercase())
|
||||
name_str.to_lowercase()
|
||||
} else {
|
||||
Some(Self::bare_slug_from_filename(&name_str).to_lowercase())
|
||||
Self::bare_slug_from_filename(&name_str).to_lowercase()
|
||||
}
|
||||
})
|
||||
.collect()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue