@@ -409,9 +409,8 @@ impl FileSystemService {
409409 /// # Arguments
410410 /// * `root_path` - The root directory to start the search from.
411411 /// * `pattern` - A glob pattern to match file names (case-insensitive). If no wildcards are provided,
412- /// the pattern is wrapped in `*` for partial matching.
413- /// * `exclude_patterns` - A list of glob patterns to exclude paths (case-sensitive). If a pattern
414- /// lacks wildcards, it is wrapped in `*` for partial matching.
412+ /// the pattern is wrapped in '*' for partial matching.
413+ /// * `exclude_patterns` - A list of glob patterns to exclude paths (case-sensitive).
415414 ///
416415 /// # Returns
417416 /// A `ServiceResult` containing a vector of`walkdir::DirEntry` objects for matching files,
@@ -431,10 +430,8 @@ impl FileSystemService {
431430 ///
432431 /// # Arguments
433432 /// * `root_path` - The root directory to start the search from.
434- /// * `pattern` - A glob pattern to match file names. If no wildcards are provided,
435- /// the pattern is wrapped in `**/*{pattern}*` for partial matching.
436- /// * `exclude_patterns` - A list of glob patterns to exclude paths (case-sensitive). If a pattern
437- /// lacks wildcards, it is wrapped in `*` for partial matching.
433+ /// * `pattern` - A glob pattern to match file names. If no wildcards are provided, the pattern is wrapped in `**/*{pattern}*` for partial matching.
434+ /// * `exclude_patterns` - A list of glob patterns to exclude paths (case-sensitive).
438435 ///
439436 /// # Returns
440437 /// A `ServiceResult` containing an iterator yielding `walkdir::DirEntry` objects for matching files,
@@ -767,9 +764,9 @@ impl FileSystemService {
767764 /// before the start position of the `match`, and extends up to `max_length` characters
768765 /// If the snippet does not include the beginning or end of the original line, ellipses (`"..."`) are added
769766 /// to indicate the truncation.
770- pub fn extract_snippet < ' a > (
767+ pub fn extract_snippet (
771768 & self ,
772- line : & ' a str ,
769+ line : & str ,
773770 match_result : Match ,
774771 max_length : Option < usize > ,
775772 backward_chars : Option < usize > ,
@@ -812,12 +809,12 @@ impl FileSystemService {
812809 let files_iter = self . search_files_iter (
813810 root_path. as_ref ( ) ,
814811 pattern. to_string ( ) ,
815- exclude_patterns. to_owned ( ) . unwrap_or ( vec ! [ ] ) ,
812+ exclude_patterns. to_owned ( ) . unwrap_or_default ( ) ,
816813 ) ?;
817814
818815 let results: Vec < FileSearchResult > = files_iter
819816 . filter_map ( |entry| {
820- self . content_search ( & query, entry. path ( ) , Some ( is_regex) )
817+ self . content_search ( query, entry. path ( ) , Some ( is_regex) )
821818 . ok ( )
822819 . and_then ( |v| v)
823820 } )
0 commit comments