Skip to content

Commit

Permalink
styles: fix with clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
darkskygit committed Dec 28, 2023
1 parent 4737ffa commit ee11c6f
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 69 deletions.
2 changes: 1 addition & 1 deletion libs/jwst-codec-utils/bin/doc_merger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{
};

use clap::Parser;
use y_octo::Doc;
use jwst_codec::Doc;

/// ybinary merger
#[derive(Parser, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion libs/jwst-codec/benches/apply_benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fn apply(c: &mut Criterion) {
&file.content,
|b, content| {
b.iter(|| {
use y_octo::*;
use jwst_codec::*;
let mut doc = Doc::new();
doc.apply_update_from_binary_v1(content.clone()).unwrap()
});
Expand Down
4 changes: 3 additions & 1 deletion libs/jwst-codec/src/doc/awareness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ use std::{cmp::max, collections::hash_map::Entry};
use super::*;
use crate::sync::Arc;

type AwarenessCallback = dyn Fn(&Awareness, AwarenessEvent) + Send + Sync + 'static;

pub struct Awareness {
awareness: AwarenessStates,
callback: Option<Arc<dyn Fn(&Awareness, AwarenessEvent) + Send + Sync + 'static>>,
callback: Option<Arc<AwarenessCallback>>,
local_id: u64,
}

Expand Down
2 changes: 1 addition & 1 deletion libs/jwst-codec/src/doc/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub struct DocStoreStatus {
/// [DocOptions] used to create a new [Doc]
///
/// ```
/// use y_octo::DocOptions;
/// use jwst_codec::DocOptions;
///
/// let doc = DocOptions::new()
/// .with_client_id(1)
Expand Down
18 changes: 0 additions & 18 deletions libs/jwst-storage/src/entities/diff_log.rs

This file was deleted.

1 change: 0 additions & 1 deletion libs/jwst-storage/src/entities/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ pub mod prelude;

pub mod blobs;
pub mod bucket_blobs;
pub mod diff_log;
pub mod docs;
pub mod optimized_blobs;
1 change: 0 additions & 1 deletion libs/jwst-storage/src/entities/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
pub use super::blobs::Entity as Blobs;
pub use super::bucket_blobs::Entity as BucketBlobs;
pub use super::diff_log::Entity as DiffLog;
pub use super::docs::Entity as Docs;
pub use super::optimized_blobs::Entity as OptimizedBlobs;
2 changes: 0 additions & 2 deletions libs/jwst-storage/src/migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod m20220101_000002_initial_doc_table;
mod m20230321_000001_blob_optimized_table;
mod m20230614_000001_initial_bucket_blob_table;
mod m20230626_023319_doc_guid;
mod m20230814_061223_initial_diff_log_table;
mod m20231124_082401_blob_deleted_at;
mod schemas;

Expand All @@ -20,7 +19,6 @@ impl MigratorTrait for Migrator {
Box::new(m20230321_000001_blob_optimized_table::Migration),
Box::new(m20230614_000001_initial_bucket_blob_table::Migration),
Box::new(m20230626_023319_doc_guid::Migration),
Box::new(m20230814_061223_initial_diff_log_table::Migration),
Box::new(m20231124_082401_blob_deleted_at::Migration),
]
}
Expand Down

This file was deleted.

4 changes: 2 additions & 2 deletions libs/jwst-storage/src/storage/docs/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ impl DocDBStorage {
}

trace!("insert update: {guid}, {update_size}");
Self::insert(conn, workspace, guid, &blob).await?;
Self::insert(conn, workspace, guid, blob).await?;
trace!("end update: {guid}");

trace!("update {}bytes to {}", blob.len(), guid);
Expand Down Expand Up @@ -358,7 +358,7 @@ impl DocStorage<JwstStorageError> for DocDBStorage {
let _lock = self.bucket.write().await;

trace!("write_update: {:?}", data);
self.update(&self.pool, &workspace_id, &guid, data.into()).await?;
self.update(&self.pool, &workspace_id, &guid, data).await?;

Ok(())
}
Expand Down

0 comments on commit ee11c6f

Please sign in to comment.