make everything pub(crate) instead of pub

conduwuit is not a library

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-22 23:48:57 -04:00 committed by June
commit 66bb88a03a
135 changed files with 1366 additions and 1247 deletions

View file

@ -10,12 +10,12 @@ use tokio::sync::watch;
type Watcher = RwLock<HashMap<Vec<u8>, (watch::Sender<()>, watch::Receiver<()>)>>;
#[derive(Default)]
pub(super) struct Watchers {
pub(crate) struct Watchers {
watchers: Watcher,
}
impl Watchers {
pub(super) fn watch<'a>(&'a self, prefix: &[u8]) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> {
pub(crate) fn watch<'a>(&'a self, prefix: &[u8]) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>> {
let mut rx = match self.watchers.write().unwrap().entry(prefix.to_vec()) {
hash_map::Entry::Occupied(o) => o.get().1.clone(),
hash_map::Entry::Vacant(v) => {
@ -31,7 +31,7 @@ impl Watchers {
})
}
pub(super) fn wake(&self, key: &[u8]) {
pub(crate) fn wake(&self, key: &[u8]) {
let watchers = self.watchers.read().unwrap();
let mut triggered = Vec::new();