Skip to content

Commit 330ecb1

Browse files
committed
Inline a constant for readability
1 parent bb162fd commit 330ecb1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/consts.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,6 @@ The name of the package metadata file.
174174
*/
175175
pub const METADATA_FILE: &str = "metadata.json";
176176

177-
/**
178-
Extensions to check when trying to find script input by name.
179-
*/
180-
pub const SEARCH_EXTS: &[&str] = &["ers", "rs"];
181-
182177
/**
183178
When generating a package's unique ID, how many hex nibbles of the digest should be used *at most*?
184179

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ where
951951
}
952952

953953
// Ok, now try other extensions.
954-
for &ext in consts::SEARCH_EXTS {
954+
for &ext in &["ers", "rs"] {
955955
let path = path.with_extension(ext);
956956
if let Ok(file) = fs::File::open(&path) {
957957
return Some((path, file));

0 commit comments

Comments
 (0)