File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
crates/rspack_fs/src/watcher Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,11 @@ impl Debug for FsWatcherIgnored {
2727/// Normalize the path by replacing backslashes with forward slashes.
2828/// Smooth out the differences in the system, specifically for Windows
2929fn normalize_path < ' a > ( path : & ' a str ) -> Cow < ' a , str > {
30- path. cow_replace ( "\\ " , "/" )
30+ if cfg ! ( target_os = "windows" ) {
31+ path. cow_replace ( "\\ " , "/" )
32+ } else {
33+ Cow :: Borrowed ( path)
34+ }
3135}
3236
3337impl FsWatcherIgnored {
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ pub enum FsEventKind {
3535
3636#[ derive( Debug , Clone , PartialEq , Eq ) ]
3737pub ( crate ) struct FsEvent {
38- pub path : ArcPath ,
39- pub kind : FsEventKind ,
38+ pub ( crate ) path : ArcPath ,
39+ pub ( crate ) kind : FsEventKind ,
4040}
4141
4242/// `EventAggregateHandler` is a trait for handling aggregated file system events.
Original file line number Diff line number Diff line change @@ -106,7 +106,6 @@ impl<'a> PathAccessor<'a> {
106106/// by specifying which paths have been added and which have been removed. It holds vectors of paths to be
107107/// added and removed, and provides functionality to apply these changes to a path tracker. This struct
108108/// facilitates batch updates to the path sets, ensuring that additions and removals are processed efficiently.
109- #[ derive( Debug ) ]
110109struct PathUpdater {
111110 pub added : Vec < ArcPath > ,
112111 pub removed : Vec < ArcPath > ,
@@ -146,7 +145,7 @@ impl PathUpdater {
146145 }
147146}
148147
149- #[ derive( Debug , Default ) ]
148+ #[ derive( Default ) ]
150149/// `PathTracker` is responsible for tracking the state of file system paths for the watcher.
151150///
152151/// It maintains three sets:
You can’t perform that action at this time.
0 commit comments