Skip to content

Commit eb97fd1

Browse files
committed
refactor: rename emthods
1 parent 89947fe commit eb97fd1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uncode/uncode-core/src/file_entry.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl FileEntry {
102102
/// * `title` - default path name
103103
/// * `path` - code path
104104
///
105-
pub fn by_dir(title: String, path: &Path) -> FileEntry {
105+
pub fn all(title: String, path: &Path) -> FileEntry {
106106
let mut root = FileEntry::new(title, path.to_path_buf());
107107
let _result = FileEntry::visit_dirs(path, 0, &mut root, path);
108108
root
@@ -158,13 +158,13 @@ mod tests {
158158
#[test]
159159
fn should_get_file_ext() {
160160
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("Cargo.toml");
161-
let entry = FileEntry::by_dir("root".to_string(), &path);
161+
let entry = FileEntry::all("root".to_string(), &path);
162162
assert_eq!("toml", entry.ext);
163163
}
164164

165165
#[test]
166166
fn should_support_for_visitor_by_level() {
167167
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
168-
FileEntry::by_dir("root".to_string(), &path);
168+
let entry = FileEntry::all("root".to_string(), &path);
169169
}
170170
}

0 commit comments

Comments
 (0)