Skip to content

Commit 72de815

Browse files
committed
reference local MAIN_SEPARATOR_STR
Change reference to imported MAIN_SEP_STR to local MAIN_SEPARATOR_STR, removing an unnecessary import.
1 parent b90dc1e commit 72de815

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

library/std/src/path.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ use crate::ops::{self, Deref};
9393
use crate::rc::Rc;
9494
use crate::str::FromStr;
9595
use crate::sync::Arc;
96-
use crate::sys::path::{HAS_PREFIXES, MAIN_SEP_STR, is_sep_byte, is_verbatim_sep, parse_prefix};
96+
use crate::sys::path::{HAS_PREFIXES, is_sep_byte, is_verbatim_sep, parse_prefix};
9797
use crate::{cmp, fmt, fs, io, sys};
9898

9999
////////////////////////////////////////////////////////////////////////////////
@@ -562,7 +562,7 @@ impl<'a> Component<'a> {
562562
pub fn as_os_str(self) -> &'a OsStr {
563563
match self {
564564
Component::Prefix(p) => p.as_os_str(),
565-
Component::RootDir => OsStr::new(MAIN_SEP_STR),
565+
Component::RootDir => OsStr::new(MAIN_SEPARATOR_STR),
566566
Component::CurDir => OsStr::new("."),
567567
Component::ParentDir => OsStr::new(".."),
568568
Component::Normal(path) => path,
@@ -1379,7 +1379,7 @@ impl PathBuf {
13791379

13801380
for c in buf {
13811381
if need_sep && c != Component::RootDir {
1382-
res.push(MAIN_SEP_STR);
1382+
res.push(MAIN_SEPARATOR_STR);
13831383
}
13841384
res.push(c.as_os_str());
13851385

@@ -1402,7 +1402,7 @@ impl PathBuf {
14021402

14031403
// `path` is a pure relative path
14041404
} else if need_sep {
1405-
self.inner.push(MAIN_SEP_STR);
1405+
self.inner.push(MAIN_SEPARATOR_STR);
14061406
}
14071407

14081408
self.inner.push(path);

0 commit comments

Comments
 (0)