path2: Update based on more review feedback
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
This commit is contained in:
parent
c01a97b7a9
commit
bab7eb20df
17 changed files with 274 additions and 390 deletions
|
@ -3996,7 +3996,7 @@ impl Parser {
|
|||
prefix.pop();
|
||||
let mod_path_stack = &*self.mod_path_stack;
|
||||
let mod_path = Path::new(".").join_many(*mod_path_stack);
|
||||
let dir_path = prefix.join_path(&mod_path);
|
||||
let dir_path = prefix.join(&mod_path);
|
||||
let file_path = match ::attr::first_attr_value_str_by_name(
|
||||
outer_attrs, "path") {
|
||||
Some(d) => dir_path.join(d),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue