diff options
author | Yiyu Lin <linyiyu1992@gmail.com> | 2023-01-15 12:06:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-15 09:36:46 +0530 |
commit | fd85f840cd707c31d08fa836562127e249c9ff62 (patch) | |
tree | c4847881976069d41d1b53616bdeaf5d073f3af6 /cli/npm | |
parent | 05ef925eb095ae603f694fe8172ddcbd5b19b9b2 (diff) |
refactor: clean up `unwrap` and `clone` (#17282)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/npm')
-rw-r--r-- | cli/npm/resolution/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/npm/resolution/mod.rs b/cli/npm/resolution/mod.rs index bd408e3ec..18158bd17 100644 --- a/cli/npm/resolution/mod.rs +++ b/cli/npm/resolution/mod.rs @@ -239,7 +239,7 @@ impl NpmResolution { package_reqs: Vec<NpmPackageReq>, ) -> Result<(), AnyError> { // only allow one thread in here at a time - let _permit = self.update_semaphore.acquire().await.unwrap(); + let _permit = self.update_semaphore.acquire().await?; let snapshot = self.snapshot.read().clone(); let snapshot = self @@ -255,7 +255,7 @@ impl NpmResolution { package_reqs: HashSet<NpmPackageReq>, ) -> Result<(), AnyError> { // only allow one thread in here at a time - let _permit = self.update_semaphore.acquire().await.unwrap(); + let _permit = self.update_semaphore.acquire().await?; let snapshot = self.snapshot.read().clone(); let has_removed_package = !snapshot |