@@ -12,7 +12,7 @@ use super::{NavigateError, Require};
1212
1313/// The standard implementation of Luau `require-by-string` navigation.
1414#[ derive( Default , Debug ) ]
15- pub struct TextRequirer {
15+ pub struct FsRequirer {
1616 /// An absolute path to the current Luau module (not mapped to a physical file)
1717 abs_path : PathBuf ,
1818 /// A relative path to the current Luau module (not mapped to a physical file)
@@ -22,7 +22,7 @@ pub struct TextRequirer {
2222 resolved_path : Option < PathBuf > ,
2323}
2424
25- impl TextRequirer {
25+ impl FsRequirer {
2626 /// The prefix used for chunk names in the require system.
2727 /// Only chunk names starting with this prefix are allowed to be used in `require`.
2828 const CHUNK_PREFIX : & str = "@" ;
@@ -36,7 +36,7 @@ impl TextRequirer {
3636 /// The filename for the Luau configuration file.
3737 const LUAU_CONFIG_FILENAME : & str = ".config.luau" ;
3838
39- /// Creates a new `TextRequirer ` instance.
39+ /// Creates a new `FsRequirer ` instance.
4040 pub fn new ( ) -> Self {
4141 Self :: default ( )
4242 }
@@ -114,7 +114,7 @@ impl TextRequirer {
114114 }
115115}
116116
117- impl Require for TextRequirer {
117+ impl Require for FsRequirer {
118118 fn is_require_allowed ( & self , chunk_name : & str ) -> bool {
119119 chunk_name. starts_with ( Self :: CHUNK_PREFIX )
120120 }
@@ -231,7 +231,7 @@ impl Require for TextRequirer {
231231mod tests {
232232 use std:: path:: Path ;
233233
234- use super :: TextRequirer ;
234+ use super :: FsRequirer ;
235235
236236 #[ test]
237237 fn test_path_normalize ( ) {
@@ -267,7 +267,7 @@ mod tests {
267267 // '..' disappears if path is absolute and component is non-erasable
268268 ( "/../" , "/" ) ,
269269 ] {
270- let path = TextRequirer :: normalize_path ( input. as_ref ( ) ) ;
270+ let path = FsRequirer :: normalize_path ( input. as_ref ( ) ) ;
271271 assert_eq ! (
272272 & path,
273273 expected. as_ref( ) as & Path ,
0 commit comments