Skip to content

Commit c7cc66b

Browse files
committed
chore: warnings
1 parent 306ff82 commit c7cc66b

File tree

13 files changed

+20
-17
lines changed

13 files changed

+20
-17
lines changed

rust/cubeshared/src/codegen/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#[allow(unused_imports)]
2+
#[allow(mismatched_lifetime_syntaxes)]
23
mod http_message_generated;
34

45
pub use http_message_generated::*;

rust/cubestore/cubehll/src/instance.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ struct BitCursor<'a> {
12171217
}
12181218

12191219
impl BitCursor<'_> {
1220-
pub fn new(input: &[u8]) -> BitCursor {
1220+
pub fn new(input: &[u8]) -> BitCursor<'_> {
12211221
BitCursor {
12221222
input,
12231223
pos: 0,

rust/cubestore/cubestore/src/cachestore/lazy.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub enum LazyRocksCacheStoreState {
2424
metastore_fs: Arc<dyn MetaStoreFs>,
2525
config: Arc<dyn ConfigObj>,
2626
listeners: Vec<tokio::sync::broadcast::Sender<MetaStoreEvent>>,
27-
init_flag: Sender<bool>,
27+
_init_flag: Sender<bool>,
2828
},
2929
Closed {},
3030
Initialized {
@@ -72,7 +72,7 @@ impl LazyRocksCacheStore {
7272
metastore_fs,
7373
config,
7474
listeners,
75-
init_flag,
75+
_init_flag: init_flag,
7676
}),
7777
}))
7878
}
@@ -101,7 +101,7 @@ impl LazyRocksCacheStore {
101101
config,
102102
listeners,
103103
// receiver will be closed on drop
104-
init_flag: _,
104+
_init_flag: _,
105105
} => {
106106
let store =
107107
RocksCacheStore::load_from_remote(&path, metastore_fs.clone(), config.clone())

rust/cubestore/cubestore/src/cachestore/queue_item_payload.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ impl QueueItemPayload {
4242
}
4343

4444
#[derive(Clone, Copy, Debug)]
45+
#[allow(dead_code)]
4546
pub(crate) enum QueueItemPayloadRocksIndex {}
4647

4748
pub struct QueueItemPayloadRocksTable<'a> {
@@ -80,6 +81,7 @@ rocks_table_new!(
8081
);
8182

8283
#[derive(Hash, Clone, Debug)]
84+
#[allow(dead_code)]
8385
pub enum QueueItemPayloadIndexKey {}
8486

8587
base_rocks_secondary_index!(QueueItemPayload, QueueItemPayloadRocksIndex);

rust/cubestore/cubestore/src/import/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ impl<'a> CsvLineParser<'a> {
323323
}
324324
}
325325

326-
fn next_value(&mut self) -> Result<MaybeOwnedStr, CubeError> {
326+
fn next_value(&mut self) -> Result<MaybeOwnedStr<'_>, CubeError> {
327327
Ok(
328328
if let Some(b'"') = self.remaining.as_bytes().iter().nth(0) {
329329
let mut closing_index = None;

rust/cubestore/cubestore/src/metastore/rocks_table.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ macro_rules! rocks_table_new {
6161
self.db.db
6262
}
6363

64-
fn snapshot(&self) -> &cuberockstore::rocksdb::Snapshot {
64+
fn snapshot(&self) -> &cuberockstore::rocksdb::Snapshot<'_> {
6565
self.db.snapshot
6666
}
6767

6868
fn mem_seq(&self) -> &crate::metastore::MemorySequence {
6969
&self.db.mem_seq
7070
}
7171

72-
fn table_ref(&self) -> &crate::metastore::DbTableRef {
72+
fn table_ref(&self) -> &crate::metastore::DbTableRef<'_> {
7373
&self.db
7474
}
7575

@@ -448,8 +448,8 @@ pub trait RocksTable: BaseRocksTable + Debug + Send + Sync {
448448
fn delete_event(&self, row: IdRow<Self::T>) -> MetaStoreEvent;
449449
fn update_event(&self, old_row: IdRow<Self::T>, new_row: IdRow<Self::T>) -> MetaStoreEvent;
450450
fn db(&self) -> &DB;
451-
fn table_ref(&self) -> &DbTableRef;
452-
fn snapshot(&self) -> &Snapshot;
451+
fn table_ref(&self) -> &DbTableRef<'_>;
452+
fn snapshot(&self) -> &Snapshot<'_>;
453453
fn mem_seq(&self) -> &MemorySequence;
454454
fn index_id(index_num: IndexId) -> IndexId;
455455
fn table_id() -> TableId;

rust/cubestore/cubestore/src/queryplanner/topk/plan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ fn extract_having(p: &Arc<LogicalPlan>) -> (Option<Expr>, &Arc<LogicalPlan>) {
207207
}
208208
}
209209

210-
fn extract_projection_and_having(p: &LogicalPlan) -> Option<ColumnProjection> {
210+
fn extract_projection_and_having(p: &LogicalPlan) -> Option<ColumnProjection<'_>> {
211211
match p {
212212
LogicalPlan::Projection {
213213
expr,

rust/cubestore/cubestore/src/remotefs/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pub trait ExtendedRemoteFs: DIService + RemoteFs {
9191
async fn list_by_page(
9292
&self,
9393
remote_prefix: String,
94-
) -> Result<BoxStream<Result<Vec<String>, CubeError>>, CubeError> {
94+
) -> Result<BoxStream<'_, Result<Vec<String>, CubeError>>, CubeError> {
9595
// Note, this implementation doesn't actually paginate.
9696
let list: Vec<String> = self.list(remote_prefix).await?;
9797

rust/cubestore/cubestore/src/remotefs/queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl ExtendedRemoteFs for QueueRemoteFs {
346346
async fn list_by_page(
347347
&self,
348348
remote_prefix: String,
349-
) -> Result<BoxStream<Result<Vec<String>, CubeError>>, CubeError> {
349+
) -> Result<BoxStream<'_, Result<Vec<String>, CubeError>>, CubeError> {
350350
self.remote_fs.list_by_page(remote_prefix).await
351351
}
352352
}

rust/cubestore/cubestore/src/remotefs/s3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl ExtendedRemoteFs for S3RemoteFs {
346346
async fn list_by_page(
347347
&self,
348348
remote_prefix: String,
349-
) -> Result<BoxStream<Result<Vec<String>, CubeError>>, CubeError> {
349+
) -> Result<BoxStream<'_, Result<Vec<String>, CubeError>>, CubeError> {
350350
let path = self.s3_path(&remote_prefix);
351351
let bucket = self.bucket.load();
352352
let leading_subpath = self.leading_subpath_regex();

0 commit comments

Comments
 (0)