Skip to content

Commit 204edd1

Browse files
committed
cargo fmt
1 parent 7db6da2 commit 204edd1

File tree

8 files changed

+34
-10
lines changed

8 files changed

+34
-10
lines changed

crates/bindings-sys/src/lib.rs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,13 @@ pub mod raw {
114114
/// - `(val, val_len)` cannot be decoded to an `AlgebraicValue`
115115
/// typed at the `AlgebraicType` of the column,
116116
/// - `val + val_len` overflows a 64-bit integer
117-
pub fn _iter_by_col_eq(table_id: TableId, col_id: ColId, val: *const u8, val_len: usize, out: *mut Buffer) -> u16;
117+
pub fn _iter_by_col_eq(
118+
table_id: TableId,
119+
col_id: ColId,
120+
val: *const u8,
121+
val_len: usize,
122+
out: *mut Buffer,
123+
) -> u16;
118124

119125
/// Inserts a row into the table identified by `table_id`,
120126
/// where the row is read from the byte slice `row` in WASM memory,
@@ -150,7 +156,13 @@ pub mod raw {
150156
/// according to the `AlgebraicType` that the table's schema specifies for `col_id`.
151157
/// - `value + value_len` overflows a 64-bit integer
152158
/// - writing to `out` would overflow a 32-bit integer
153-
pub fn _delete_by_col_eq(table_id: TableId, col_id: ColId, value: *const u8, value_len: usize, out: *mut u32) -> u16;
159+
pub fn _delete_by_col_eq(
160+
table_id: TableId,
161+
col_id: ColId,
162+
value: *const u8,
163+
value_len: usize,
164+
out: *mut u32,
165+
) -> u16;
154166

155167
/*
156168
/// Deletes the primary key pointed to at by `pk` in the table identified by `table_id`.
@@ -189,7 +201,12 @@ pub mod raw {
189201
/// - a table with the provided `table_id` doesn't exist
190202
/// - `(filter, filter_len)` doesn't decode to a filter expression
191203
/// - `filter + filter_len` overflows a 64-bit integer
192-
pub fn _iter_start_filtered(table_id: TableId, filter: *const u8, filter_len: usize, out: *mut BufferIter) -> u16;
204+
pub fn _iter_start_filtered(
205+
table_id: TableId,
206+
filter: *const u8,
207+
filter_len: usize,
208+
out: *mut BufferIter,
209+
) -> u16;
193210

194211
/// Advances the registered iterator with the index given by `iter_key`.
195212
///

crates/core/src/db/datastore/locking_tx_datastore/btree_index.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,13 @@ pub(crate) struct BTreeIndex {
8383
}
8484

8585
impl BTreeIndex {
86-
pub(crate) fn new(index_id: IndexId, table_id: TableId, cols: NonEmpty<ColId>, name: String, is_unique: bool) -> Self {
86+
pub(crate) fn new(
87+
index_id: IndexId,
88+
table_id: TableId,
89+
cols: NonEmpty<ColId>,
90+
name: String,
91+
is_unique: bool,
92+
) -> Self {
8793
Self {
8894
index_id,
8995
table_id,

crates/core/src/db/datastore/locking_tx_datastore/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ mod tests {
21622162
error::ResultTest,
21632163
ColumnIndexAttribute,
21642164
};
2165-
use spacetimedb_primitives::{IndexId, TableId, SequenceId};
2165+
use spacetimedb_primitives::{IndexId, SequenceId, TableId};
21662166
use spacetimedb_sats::{product, AlgebraicType, AlgebraicValue, ProductValue};
21672167

21682168
fn u32_str_u32(a: u32, b: &str, c: u32) -> ProductValue {

crates/core/src/vm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ pub(crate) mod tests {
518518
use nonempty::NonEmpty;
519519
use spacetimedb_lib::error::ResultTest;
520520
use spacetimedb_lib::relation::{DbTable, FieldName};
521-
use spacetimedb_primitives::{TableId, SequenceId};
521+
use spacetimedb_primitives::{SequenceId, TableId};
522522
use spacetimedb_sats::{product, AlgebraicType, ProductType, ProductValue};
523523
use spacetimedb_vm::dsl::*;
524524
use spacetimedb_vm::eval::run_ast;

crates/lib/src/relation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ use crate::auth::{StAccess, StTableType};
88
use crate::error::RelationError;
99
use crate::table::ColumnDef;
1010
use crate::DataKey;
11+
use spacetimedb_primitives::TableId;
1112
use spacetimedb_sats::algebraic_value::AlgebraicValue;
1213
use spacetimedb_sats::product_value::ProductValue;
13-
use spacetimedb_primitives::TableId;
1414
use spacetimedb_sats::satn::Satn;
1515
use spacetimedb_sats::{algebraic_type, AlgebraicType, ProductType, ProductTypeElement, Typespace, WithTypespace};
1616

crates/primitives/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
mod ids;
44

5-
pub use ids::{ColId, SequenceId, TableId, IndexId};
5+
pub use ids::{ColId, IndexId, SequenceId, TableId};

crates/sats/src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use crate::{AlgebraicType, AlgebraicValue, ArrayType, BuiltinType, MapType, ProductType, ProductValue};
2-
use spacetimedb_primitives::{TableId, ColId, IndexId, SequenceId};
2+
use spacetimedb_primitives::{ColId, IndexId, SequenceId, TableId};
33

44
impl crate::Value for AlgebraicValue {
55
type Type = AlgebraicType;

modules/rust-wasm-test/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#![allow(clippy::disallowed_names)]
22
use spacetimedb::{
3-
delete_by_col_eq, query, spacetimedb, AlgebraicValue, Deserialize, ReducerContext, SpacetimeType, Timestamp, TableId,
3+
delete_by_col_eq, query, spacetimedb, AlgebraicValue, Deserialize, ReducerContext, SpacetimeType, TableId,
4+
Timestamp,
45
};
56
use spacetimedb_lib::bsatn;
67

0 commit comments

Comments
 (0)