summaryrefslogtreecommitdiff
path: root/cli/util
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-07-08 10:12:10 -0400
committerGitHub <noreply@github.com>2024-07-08 14:12:10 +0000
commit86010bec092d074b161800da06149cfb79fb9f4b (patch)
tree78ab91b1fffc53ff8a56fc86e2c6f0459b21a129 /cli/util
parent1e97f0f1487d27b69d85ebe8e9d84c21af1d9dde (diff)
fix(workspace): better cli file argument handling (#24447)
Closes https://github.com/denoland/deno/issues/24422
Diffstat (limited to 'cli/util')
-rw-r--r--cli/util/collections.rs38
-rw-r--r--cli/util/mod.rs1
2 files changed, 0 insertions, 39 deletions
diff --git a/cli/util/collections.rs b/cli/util/collections.rs
deleted file mode 100644
index 21f73024b..000000000
--- a/cli/util/collections.rs
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
-
-use std::marker::PhantomData;
-
-pub struct CheckedSet<T: std::hash::Hash + ?Sized> {
- _kind: PhantomData<T>,
- checked: std::collections::HashSet<u64>,
-}
-
-impl<T: std::hash::Hash + ?Sized> Default for CheckedSet<T> {
- fn default() -> Self {
- Self {
- _kind: Default::default(),
- checked: Default::default(),
- }
- }
-}
-
-impl<T: std::hash::Hash + ?Sized> CheckedSet<T> {
- pub fn with_capacity(capacity: usize) -> Self {
- Self {
- _kind: PhantomData,
- checked: std::collections::HashSet::with_capacity(capacity),
- }
- }
-
- pub fn insert(&mut self, value: &T) -> bool {
- self.checked.insert(self.get_hash(value))
- }
-
- fn get_hash(&self, value: &T) -> u64 {
- use std::collections::hash_map::DefaultHasher;
- use std::hash::Hasher;
- let mut hasher = DefaultHasher::new();
- value.hash(&mut hasher);
- hasher.finish()
- }
-}
diff --git a/cli/util/mod.rs b/cli/util/mod.rs
index 2b6583fbc..b7eef95d3 100644
--- a/cli/util/mod.rs
+++ b/cli/util/mod.rs
@@ -2,7 +2,6 @@
// Note: Only add code in this folder that has no application specific logic
pub mod checksum;
-pub mod collections;
pub mod console;
pub mod diff;
pub mod display;