From: Ian Jackson Date: Mon, 3 May 2021 12:03:22 +0000 (+0100) Subject: path resolution tests: Tidy direct use of su_rc to su() X-Git-Tag: otter-0.6.0~450 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2ffea3b4246bf7cb7bfb57fbc2d7d6dbe7b2d69d;p=otter.git path resolution tests: Tidy direct use of su_rc to su() Signed-off-by: Ian Jackson --- diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index 7cc94032..aa4afc3e 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -203,7 +203,7 @@ impl Ctx { pub fn chdir_root(&mut self, f: F) where F: FnOnce(&mut Self) -> Result<(),AE> { - let tmp = &(*self.su_rc).borrow().ds.abstmp.clone(); + let tmp = self.su().ds.abstmp.clone(); env::set_current_dir("/").expect("cd /"); self.prctx = PathResolveContext::RelativeTo(tmp.clone()); f(self).expect("run test");