Fix main & improve cursor sync #101
4 changed files with 4 additions and 5 deletions
Try fix
commit
fc4ddb8f1f
3
.github/workflows/check.yml
vendored
3
.github/workflows/check.yml
vendored
|
|
@ -25,8 +25,7 @@ jobs:
|
||||||
|
|
||||||
- name: Setup rust
|
- name: Setup rust
|
||||||
run: |
|
run: |
|
||||||
rustup install 1.89
|
rustup update
|
||||||
rustup default 1.89
|
|
||||||
cargo install sqlx-cli cargo-machete
|
cargo install sqlx-cli cargo-machete
|
||||||
cd sync-server
|
cd sync-server
|
||||||
sqlx database create --database-url sqlite://db.sqlite3
|
sqlx database create --database-url sqlite://db.sqlite3
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "1.89.0"
|
channel = "nightly"
|
||||||
targets = [ "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl" ]
|
targets = [ "x86_64-unknown-linux-gnu", "x86_64-unknown-linux-musl" ]
|
||||||
profile = "default"
|
profile = "default"
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ impl Cursors {
|
||||||
all_device_cursors.retain(|c| &c.client_cursors.device_id != device_id);
|
all_device_cursors.retain(|c| &c.client_cursors.device_id != device_id);
|
||||||
all_device_cursors.push(ClientCursorsWithTimeToLive::new(ClientCursors {
|
all_device_cursors.push(ClientCursorsWithTimeToLive::new(ClientCursors {
|
||||||
user_name,
|
user_name,
|
||||||
device_id: device_id.to_string(),
|
device_id: device_id.clone(),
|
||||||
documents_with_cursors: document_to_cursors,
|
documents_with_cursors: document_to_cursors,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ impl Header for DeviceIdHeader {
|
||||||
where
|
where
|
||||||
E: Extend<HeaderValue>,
|
E: Extend<HeaderValue>,
|
||||||
{
|
{
|
||||||
let value = HeaderValue::from_static(Box::leak(self.0.to_string().into_boxed_str()));
|
let value = HeaderValue::from_static(Box::leak(self.0.clone().into_boxed_str()));
|
||||||
|
|
||||||
values.extend(std::iter::once(value));
|
values.extend(std::iter::once(value));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue