From 8e4cb90688998cca683fb3bfa885c6834079b3e9 Mon Sep 17 00:00:00 2001 From: Rory Dudley Date: Tue, 26 Mar 2024 13:30:25 -0600 Subject: Rename prefresh() Rename the path::prefresh() function to path::refresh(). Calling convention should be to `use crate::path;` or `mod path;`, and then call path::refresh(...), for verbosity. --- src/path.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/path.rs') diff --git a/src/path.rs b/src/path.rs index 28eb45b..412489b 100644 --- a/src/path.rs +++ b/src/path.rs @@ -17,11 +17,14 @@ use std::path::Path; /// let path = vec!["/bin"]; /// let path = path.into_iter().map(Path::new).collect(); /// let mut bins = prefresh(&path); +/// let mut bins = path::refresh(&path); /// ... /// // A situation occurs where the $PATH needs to be refreshed /// bins = prefresh(&path) +/// bins = path::refresh(&path) /// ``` pub fn prefresh(path: &Vec<&Path>) -> Vec { +pub fn refresh(path: &Vec<&Path>) -> Vec { let mut bins: Vec = Vec::new(); for p in path { -- cgit v1.2.3