Skip to content

Commit fa68e5e

Browse files
committed
Changed: Add #[inline] and doc comment to is_prevalidated_workdir
Add #[inline] attribute and brief documentation to is_prevalidated_workdir method to indicate it's a small, hot-path exact-match check and help the optimizer inline it. The doc comment explains the method returns true only for exact path matches against prevalidated directories.
1 parent 331214d commit fa68e5e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • src/llm-coding-tools-bubblewrap/src/profile

src/llm-coding-tools-bubblewrap/src/profile/types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,10 @@ impl Profile {
468468
)))
469469
}
470470

471+
/// Returns true only for exact path matches against prevalidated directories:
472+
/// workspace(), synthetic_home(), cache_root() (when mount_cache_root()),
473+
/// TmpBacking::BindHost host_dir, and entries in read_only_mounts() and read_write_mounts().
474+
#[inline]
471475
pub(crate) fn is_prevalidated_workdir(&self, workdir: &Path) -> bool {
472476
workdir == self.workspace()
473477
|| workdir == self.synthetic_home()

0 commit comments

Comments
 (0)