about summary refs log tree commit diff
path: root/src/build_helper
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-16 13:23:41 +0100
committerJakub Beránek <berykubik@gmail.com>2025-03-19 14:55:37 +0100
commit599dc823c9d7049e8ee9eb80203a24cac41cb124 (patch)
treec783f7099eed1890556d9b5203dcdbfaf4d813ee /src/build_helper
parentc4b38a596767c9c6275c937cf3a2d4b9612b4875 (diff)
downloadrust-599dc823c9d7049e8ee9eb80203a24cac41cb124.tar.gz
rust-599dc823c9d7049e8ee9eb80203a24cac41cb124.zip
Simplify `get_git_modified_files`
It only ever returned `Some`, so `Option` was useless in its return type.
Diffstat (limited to 'src/build_helper')
-rw-r--r--src/build_helper/src/git.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/build_helper/src/git.rs b/src/build_helper/src/git.rs
index 9f778a2fd77..ea473c8c397 100644
--- a/src/build_helper/src/git.rs
+++ b/src/build_helper/src/git.rs
@@ -173,7 +173,7 @@ pub fn get_git_modified_files(
     config: &GitConfig<'_>,
     git_dir: Option<&Path>,
     extensions: &[&str],
-) -> Result<Option<Vec<String>>, String> {
+) -> Result<Vec<String>, String> {
     let merge_base = get_closest_merge_commit(git_dir, config, &[])?;
 
     let mut git = Command::new("git");
@@ -195,7 +195,7 @@ pub fn get_git_modified_files(
             }
         })
         .collect();
-    Ok(Some(files))
+    Ok(files)
 }
 
 /// Returns the files that haven't been added to git yet.