Skip to content

Commit

Permalink
Update function name
Browse files Browse the repository at this point in the history
  • Loading branch information
aleury committed Sep 11, 2024
1 parent 13f0b91 commit 2ac1155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ use std::time::Instant;
/// # Examples
///
/// ```
/// use spacehog::get_files_with_minimum_size;
/// use spacehog::find_top_n_largest_files;
///
/// let rx = get_files_with_minimum_size("testdata", 5, true).unwrap();
/// let rx = find_top_n_largest_files("testdata", 5, true).unwrap();
///
/// let results = rx.recv().unwrap();
///
/// assert_eq!(results.len(), 4);
/// ```
pub fn get_files_with_minimum_size(
pub fn find_top_n_largest_files(
path: &str,
limit: usize,
ignore_hidden: bool,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::{
path::PathBuf,
};

use spacehog::{get_files_with_minimum_size, FileSize};
use spacehog::{find_top_n_largest_files, FileSize};

#[derive(Parser, Debug)]
#[command(version, about)]
Expand All @@ -30,7 +30,7 @@ fn main() -> anyhow::Result<()> {
let ignore_hidden = !args.hidden;
let mut app = App::new(std::io::stdout());

let rx = get_files_with_minimum_size(&args.path, args.number, ignore_hidden)?;
let rx = find_top_n_largest_files(&args.path, args.number, ignore_hidden)?;
while let Ok(results) = rx.recv() {
if !results.is_empty() {
app.update(results);
Expand Down

0 comments on commit 2ac1155

Please sign in to comment.